Plot 2 functions red and blue with plot function
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
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.
Risposte (1)
Star Strider
il 10 Ott 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:

Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!