Plot 2 functions red and blue with plot function
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
hello world,
I want to plot a function this two functions:
f1(n)= n* tan(n) and f2(n)= n+1; the fisrst with red color and the second with blue color with plot()
how can I do it?
thank you.
Réponses (1)
Star Strider
le 10 Oct 2020
Try this:
syms n
f1(n)= n* tan(n);
f2(n)= n+1;
figure
fplot(f1, [-pi pi], 'r')
hold on
fplot(f2, [-pi pi], 'b')
hold off
producing:

Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!