Beantwortet
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...

mehr als 7 Jahre vor | 1

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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....

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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. ...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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_...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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 = ...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
'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...

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 3

| akzeptiert

Beantwortet
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 ...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 3

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
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 ...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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. ...

fast 8 Jahre vor | 0

Beantwortet
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...

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
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...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
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. ...

fast 8 Jahre vor | 0

Beantwortet
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...

fast 8 Jahre vor | 4

| akzeptiert

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

fast 8 Jahre vor | 1

Beantwortet
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 ...

fast 8 Jahre vor | 1

| akzeptiert

Mehr laden