Plotting two continuous figures

조회 수: 5 (최근 30일)
Adrian Quesada
Adrian Quesada 2017년 11월 2일
댓글: Rik 2017년 11월 2일
Hi I need to make two graphs in one figure. I have to plot the current vrs the voltage, for this I use the following command:
voltage= [-8:0.5:10];
r=200;
current=voltage/r;
plot (voltage,current)
In the next figure I have to plot the change in the current as a function of the resistance, but the starting point of this graph must be the end of the previous one. I calculate a new vector of the current as following:
v=10;
rn=[200:-0.5:0];
in=v./rn;
The complete figure should be similar to the enclosed one, so I have to reverse the x axis in the second graph.
How could I make the two graphs in one?
Thanks
  댓글 수: 1
Rik
Rik 2017년 11월 2일
Be careful about the names you give things. A figure has a specific meaning in Matlab, which doesn't sound like what you are describing.
You know about hold on? You can use that to call plot again without it cleaning the axis.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by