How to plot like this????????

조회 수: 6 (최근 30일)
Sadiq Akbar
Sadiq Akbar 2022년 7월 1일
댓글: Sadiq Akbar 2022년 7월 4일
I want to draw my plot like the one shown in the attachment. I tried but in vain.

채택된 답변

the cyclist
the cyclist 2022년 7월 1일
There are examples in the documentation for the plot command that are very similar to this, for example:
x = 0:pi/10:2*pi;
y1 = sin(x);
y2 = sin(x-0.25);
y3 = sin(x-0.5);
figure
plot(x,y1,'g',x,y2,'b--o',x,y3,'c*')
You'll also need the legend command.
  댓글 수: 7
the cyclist
the cyclist 2022년 7월 4일
My example is not intended to create your exact figure.
My example is intended to teach you how the MATLAB syntax works. It should be very easy for you to read the documentation I posted, and edit my example to do what you need. For example, to create a triangle marker instead of a circle marker, you can use '-^' instead of '-o'.
Sadiq Akbar
Sadiq Akbar 2022년 7월 4일
Ok dear the cycllist thank you very much for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by