Contour curve-fitting

3 views (last 30 days)
Ogheneochuko
Ogheneochuko on 13 Oct 2015
Commented: Mike Garrity on 14 Oct 2015
Hello All, I had earlier asked a question on the use of lsqcurvefit on the contours produced from my program shown below but I got the response that it is not possible to use lsqcurvefit. As such is there any kind of curve fitting that can be applied to the contours produced from the program applied to the mat file attached. If there is please help. Thanks.
Z = load('Ir_6716.mat');
flds = fieldnames(Z);% Fieldnames of data.
field = flds{1};% First field in data structure.
A = Z.(field);
B = -272.+A;% converts from kelvin to celsius
contour(flipud(B));
[C,h] = contour(interp2(flipud(B),'spline'));
clabel(C,h);
  1 Comment
Mike Garrity
Mike Garrity on 14 Oct 2015
What's your goal? If you're trying to smooth the contours by using least squares, I think that you'll find that it is a lot more robust to do apply a low-pass filter to the 2D data, and then contour that. Filtering after contouring tends to have stability issues because you've discarded so much information before filtering.

Sign in to comment.

Answers (0)

Categories

Find more on Contour Plots 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!