回答済み
How to crop a certain boundary of an image?
How about the following? Img = imread('irregular-shape-leaf_21197202.jpg'); Igray = rgb2gray(Img); BW = ~imbinarize(Igray...

7年以上 前 | 1

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 0

回答済み
'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年以上 前 | 1

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

7年以上 前 | 3

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 3

| 採用済み

回答済み
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年以上 前 | 1

| 採用済み

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

8年弱 前 | 2

| 採用済み

回答済み
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 ...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 1

| 採用済み

回答済み
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. ...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 2

| 採用済み

回答済み
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...

8年弱 前 | 0

| 採用済み

回答済み
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. ...

8年弱 前 | 0

回答済み
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...

8年弱 前 | 4

| 採用済み

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

8年弱 前 | 1

回答済み
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 ...

8年弱 前 | 1

| 採用済み

さらに読み込む