Plotting two continuous figures

2 Ansichten (letzte 30 Tage)
Adrian Quesada
Adrian Quesada am 2 Nov. 2017
Kommentiert: Rik am 2 Nov. 2017
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 Kommentar
Rik
Rik am 2 Nov. 2017
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by