smxx said:hi & happy new year
use matlab curve fitting function.
echo47 said:Hmmm, unclear question. You don't need to convert the improfile data into a function to do an FFT.
Here is a slightly modified version of MATLAB's improfile help example:
I = imread('liftingbody.png');
x = [19 427 416 77];
y = [96 462 37 33];
c = improfile(I, x, y);
h = fft(c);
echo47 said:Hmmm, unclear question. You don't need to convert the improfile data into a function to do an FFT.
Here is a slightly modified version of MATLAB's improfile help example:
I = imread('liftingbody.png');
x = [19 427 416 77];
y = [96 462 37 33];
c = improfile(I, x, y);
h = fft(c);
echo47 said:Your code seems incomplete and gives me error messages.
imshow is for displaying an image, not for plotting a graph.
Try this:
I = imread('liftingbody.png');
x = [19 427 416 77];
y = [96 462 37 33];
c = improfile(I, x, y);
h = fft(c);
plot(abs(h));
echo47 said:I simply copied those numbers from MATLAB's example.Type "doc improfile" and you will see it. The path has three line segments, so there are four (x,y) points. (I'm using MATLAB 7.0.1 -- your version may have different examples.)
If you want your (x,y) path to go from (1,180) to (574,180), then this should work:
x = [1 574];
y = [180 180];
echo47 said:I see the nice peak.
Please clarify "get a certain value that I might be needed". I can't decypher your grammar.
echo47 said:In your MATLAB Workspace tab, you can double-click the array name (or type "openvar arrayname") to open Array Editor. Then you can examine all the array data. Or you can simply type the array name and MATLAB will display its data.
If you want to locate the maximum value in the array, try this:
[x,y] = max(arrayname);
You can display a data point value directly in the plot() window. Click the "Data Cursor" button, and then click a point on the curve, or drag your cursor over the curve. Use Alt-Click to display multiple points.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?