How to plot multiple curves in a single figure by varying a parameter?
Ältere Kommentare anzeigen
I have the following equation :-

my x ranges from (-5,10).
I want to plot multiple curves (y vs x) of the following equation by varying the parameter 'c' i.e giving some discrete values of 'c'.
How do I do that using a for loop?
Akzeptierte Antwort
Weitere Antworten (1)
for c=1:5
fimplicit( @(x,y) y.^2/2-cos(x) - c)
hold on
end
hold off
xlim([-5,10])
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




