Getting a maximum from a fitted curve (smoothing spline)?
Show older comments
Context: vibration experiments, plotting frequency vs displacement
What I have: data for freqency (x) and displacement (y). Plotted they form roughly a -x^2 shape. I used the curve fitting tool, with smooth spline selected to interpolate my data. The code returned was as follows:
% Fit
[xData1, yData1] = prepareCurveData( Frequency_UD, Displacement_UD );
% Set up fittype and options.
ft = fittype( 'smoothingspline' );
% Fit model to data.
[fitresult{1}, gof(1)] = fit( xData1, yData1, ft );
%plot
plot( fitresult{1},'c', xData1, yData1, 'k.');
What I want: I want to determine the resonant frequency (the point where displacement is greatest), so basically the peak of my graph. Obviously I can calculate it or visually locate it but thats not the point of the question.
For further clarity here is a picture of the graph I am working on

Accepted Answer
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

