Hi all,
I am trying to plot four given values on matlab.
the values are
t = 0;
ta = 0.63;
tb = 0.71;
tc = 0.5;
Could anybody advice how can this been plotted on matlab?
It's been a long time I've used matlab, and I have lost the touch of the commands.
Thanks in advacne for those who oculd help.

댓글 수: 5

Jos Jordan
Jos Jordan 2021년 2월 6일
I don't understand - how would you like to plot them?
The scatter() function could work, but what variables are on the axes and how are they related to the variables you have given?
bagya vivekanandhan
bagya vivekanandhan 2021년 2월 6일
Hi!
I am trying for basic line plot that i'm trying to plot. Assuming the suitable range on the x and y axis.
As an example : on both x and y axis : it's 0 : 0.1 : 1.
So do you mean of an y/x graph, each point would have the value
t = [0, 0];
ta = [0.63, 0.63];
tb = [0.71, 0.71];
tc = [0.5, 0.5];
or am I misunderstanding the question?
bagya vivekanandhan
bagya vivekanandhan 2021년 2월 6일
You have understood it right. That's how i wanted to plot. How can i process with that?
I'm sorry, I could've tried to explain it better.
Thanks.
Cris LaPierre
Cris LaPierre 2021년 2월 6일
I strongly suggest you go through MATLAB Onramp. Ch 9 covers plotting.

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

 채택된 답변

Cris LaPierre
Cris LaPierre 2021년 2월 6일
편집: Cris LaPierre 2021년 2월 6일

0 개 추천

Based on what you've shared, I'd probably do the following.
t = 0;
ta = 0.63;
tb = 0.71;
tc = 0.5;
plot([t,ta,tb,tc])
Y values are the 4 values you have provided. Since no X values were provided, index number is used - the first y value is assigned the x value of 1, the 2nd gets and x value of 2, etc.

추가 답변 (1개)

Jos Jordan
Jos Jordan 2021년 2월 6일

0 개 추천

Given that:
t = [0, 0];
ta = [0.63, 0.63];
tb = [0.71, 0.71];
tc = [0.5, 0.5];
you could then set
x = [0, 0.63, 0.71, 0.5];
x = y;
plot(x,y);
and then use the property inspector to play around until you make it look as you want to.

댓글 수: 1

bagya vivekanandhan
bagya vivekanandhan 2021년 2월 6일
Thanks a lot, That worked!
I'll go through the referred!

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

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by