Plot 2 functions red and blue with plot function
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Star Strider
2020년 10월 10일
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:

댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!