Plotting two(function) curve in same figure?how?

2 views (last 30 days)
can Iam plotting two(function) curve in one figure?how? y1=function y2=function x=1:1:40
plot(x,y1) plot(x,y2)
in same figure? how?

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 15 Nov 2013
Edited: Azzi Abdelmalek on 15 Nov 2013
plot(x,y1)
hold on
plot(x,y2)
%or
plot(x,y1,x,y2)
%or
plotyy(x,y1,x,y2)
  3 Comments
Azzi Abdelmalek
Azzi Abdelmalek on 15 Nov 2013
Edited: Azzi Abdelmalek on 15 Nov 2013
figure
hold on
plot(x,y1)
plot(x,y2)
plot(x,y3)
%and so on
hold off

Sign in to comment.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!