[xData, yData] = prepareCurveData( N, A );
ft = fittype( 'poly6' );
[fitresult, gof] = fit( xData, yData, ft );
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, xData, yData );
legend( h, 'A vs. N', 'untitled fit 1', 'Location', 'NorthEast', 'Interpreter', 'none' );
xlabel( 'N', 'Interpreter', 'none' );
ylabel( 'A', 'Interpreter', 'none' );
grid on
hold on
plot(x,y);
axis([-15 15 200 800])
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/551860-plot-doesn-t-work-in-m-file#comment_906772
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/551860-plot-doesn-t-work-in-m-file#comment_906772
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/551860-plot-doesn-t-work-in-m-file#comment_906784
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/551860-plot-doesn-t-work-in-m-file#comment_906784
Sign in to comment.