plotting three curves in the same plot
조회 수: 4(최근 30일)
표시 이전 댓글
Salma fathi 2022년 6월 8일
댓글: Sajid Afaque 2022년 6월 8일
I have plotted the follwing two curves as in the image below (fig2).
For the curve in red I have used a matlab generated code to do some curve fitting for it and got the curve in the below image (fig1).
Now I would like to be able to add the fitted curve to the plot in fig2 for comparison reasons, is there a way to do that?
thank you in advance,
댓글 수: 1
편집: Sajid Afaque 2022년 6월 8일
yeah you can use hold on before curve fitting
figure(2); %the intended figure number on which you need plot
댓글 수: 2
i can no longer see your comment (why did you delete it)
you can also use this
%in the first section
fh = figure;
%then your two plots
%% then you can apply optimisation
%and now the fitted plot
fh.Name = 'khan 1'; %you can name your figure
Find more on Get Started with Curve Fitting Toolbox 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!