Answered
How to fit a specific distribution to data
Assuming your data samples are stored in 1-by-N (or N-by-1) array |x|, the following code can fit log-normal distribution to the...

7 years ago | 0

| accepted

Answered
Return unique items from two matrix
How about this? h = setxor(f',g','rows'); h = h'; The result is: >> h h = 24.1326 26.1735 311.1230 448....

7 years ago | 1

| accepted

Answered
How to plot a curved signal ?
How about the following? figure plot(time,xArray) ax = gca; ax.YTick = [0 1]; ax.XTick = [5 7 10 15]; <</matlabcentr...

7 years ago | 0

Answered
sphere with center and radius
How about this? [x,y,z] = sphere; x = x*650000; y = y*650000; z = z*650000; figure surf(x+650000,y+650000,z+650000...

7 years ago | 1

| accepted

Answered
How to access last 5 images from the list of sub folders and save it in some order of folders?
Regarding your Q1, the following script can copy the 'NI_Acropped' folder structure to 'VL_Acropped' without copying files. ...

7 years ago | 0

Answered
Read and save multiple PNG images after inserting text on them (This text is the filename itself without any extensions)
Assuming your original .png files are stored in 'folder1', the following example can generates images with file name and saves t...

7 years ago | 0

| accepted

Answered
Please help me to find Perimeter using regionprops()
Please set 'Perimeter' to the 2nd input argument of the |regionprops| function. The following is an example. I = imread('3_...

7 years ago | 1

| accepted

Answered
Average matrices based on unique value in structure resulting in a new structure
To obtain the result in structure type, please combine |struct2table|, |splitapply| and |table2struct| functions like the follow...

7 years ago | 0

Answered
Average matrices based on unique value in structure resulting in a new structure
How about using |splitapply| function, like: IMERG = struct2table(IMERG); avgLat = splitapply(@(x) {mean([x{:}],2)}, IMERG...

7 years ago | 1

| accepted

Answered
Renaming Files based on a Folder Name in Sequence
Thank you for the clarification. Then, the program would be something like this. s = dir('./participant*/*.*'); prevDir = ...

7 years ago | 1

| accepted

Answered
how to mask the image and keep only one color "green channel"?
Hi Oman-san, Thank you for your prompt reply. The following is the code to generate the posted figure. I hope this will be so...

7 years ago | 1

Answered
How to do multiple gaussian profiles summation, peak detection and fwhm analysis?
Regarding QUE_1 and QUE_3, please try the following: findpeaks(f1,'WidthReference','halfheight','Annotate','extents') Wi...

7 years ago | 1

| accepted

Answered
How to slice each string in a string array without using for loop
Another possible solution: celldata = [{'2018-12-12'} {'2018-11-05'} {'2018-09-02'}]; M = extractBetween(celldat...

7 years ago | 1

Answered
Summing of non-zero elements of columns using indexing
If your matrix contains many zeros, I would recommend converting it to sparse matrix and applying |sum| function, like the follo...

7 years ago | 0

Answered
'For ' loop for every day for one minut fequency sea level data
I would recommend storing your data in |timetable| variable, and apply |retime| function to do your task. Following is an exampl...

7 years ago | 1

Answered
1つの行列を等間隔の列に分割し、それぞれの要素を足し合わせるにはどうしたらよいですか?
|reshape| 関数をうまく使うと、以下のように簡単に求めることができます。 A2 = reshape(A,[10,100,10]); B = sum(A2,3);

7 years ago | 3

| accepted

Answered
Take a matrix of integers and convert to a binary matrix
One simple and straight-forward way is using for-loop, like: A = [1 6 8; 3 5 7; 2 4 9]; B = zeros(3,10); for kk = 1:3 ...

7 years ago | 0

Answered
area of intersection between a circle and polygon
One possible way is generating intersection by |intersect| function, and calculate it's area by |area| function. The following i...

7 years ago | 3

| accepted

Answered
How to import txt.-files with different columns and numbers/letters?
If your data file looks like this: C:\Bose\.... "Points","Elapsed Time ","Scan Time ","Disp ","Load 3","T1_Control","T2_C...

7 years ago | 1

| accepted

Answered
変数名に日付を含んだ変数のみを保存したい
対象となる変数名の命名ルールが「AAA+数字6桁」のように決まっている場合、例えば以下のようにすると個別に保存することができます。 % AAA+数字6桁の変数一覧を作成 varList = who('-regexp','AAA[0-9]{6}'...

7 years ago | 2

| accepted

Answered
Placing 6 items in 3 different boxes
Like this? N1, N2 and N3 are possible combination of select k out of 6 items for 1st box, l out of 6-k items for 2nd box and ...

7 years ago | 0

Answered
Problem having isoutlier detecting anything
One possible way to detect this type of outlier would be like this: load('out1.mat'); % Assuming that data has 2nd ord...

7 years ago | 1

| accepted

Answered
Code to calculate Bi-Hourly energy tariff
I think you can do this type of task much easier by using |timetable| and |retime| function. The following is an example. ...

7 years ago | 0

Answered
How to count how many different objects
How about the following way? % Load the image BW = imread('bARgija.png'); % Remove small area (< 10 pixel) BW2 = bwa...

7 years ago | 2

| accepted

Answered
Problems using retime within timetable
I think your data set is the following: <https://www.federalreserve.gov/pubs/feds/2006/200628/200628abs.html> Looking at t...

7 years ago | 0

| accepted

Answered
Finding L and R marks in a X-Ray image
Assuming size and resolution of L- and R-mark on your X-ray images are always the same, following process will work. Step-1. ...

7 years ago | 0

Answered
Connecting Data points in a smooth curve
You can do this task by applying the method used in the 2nd example in |spline| function help page. <https://www.mathworks.co...

7 years ago | 4

| accepted

Answered
Read .csv files in the right order
Please try the following before the for-loop. list = dir(fullfile(yourDirectory,'*.csv')); [~, idx] = sort(str2double(rege...

7 years ago | 1

Answered
Averaging daily phone taps
Hi Kristen-san, Thank you for sharing detailed explanation. I think you can do your task more simply and more efficiently by ...

7 years ago | 1

| accepted

Answered
how to extract x and y coordinates within yellow boundary in an image
How about the following? I = imread('untitled.jpg'); Ilab = rgb2lab(I); BW = Ilab(:,:,3) > 25; se = strel('disk',20); B...

7 years ago | 0

| accepted

Load more