I would like to be able to export fit residual values. Is this possible? If so how?
2 views (last 30 days)
Show older comments
%%Thin-Plate Spline smoothing
figure( 'Name', 'Thin-Plate Spline' );
st = tpaps(xydata',cddata'); % requires data to be in coloumns not rows
subplot(2,1,1);
fnplt(st), hold on
plot3(xydata(:,1),xydata(:,2),cddata,'wo','markerfacecolor','k')
% Label axes
title('Thin-Plate-Spline fit to input CD map');
xlabel( 'xcom' );
ylabel( 'ycom' );
zlabel( 'CD' );
grid on
avals = fnval(st,xydata');
residual = cddata - avals';
subplot(2,1,2);
plot3(xydata(:,1),xydata(:,2),residual,'wo','markerfacecolor','k')
% Label axes
%xlabel( 'xcom' );
title('Fit residual');
ylabel( 'ycom' );
zlabel( 'CD residual' );
view([90 0]);
grid on
CDsigma = std(cddata);
ResidualSigma = std(residual);
0 Comments
Answers (1)
Tom Lane
on 15 Aug 2012
That's hard to read (consider formatting it as code), but it appears to create a variable named "residual" in the workspace. Is that what you mean by exporting residuals? If not, please clarify.
0 Comments
See Also
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!