Plotting two continuous figures

2 visualizaciones (últimos 30 días)
Adrian Quesada
Adrian Quesada el 2 de Nov. de 2017
Comentada: Rik el 2 de Nov. de 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 comentario
Rik
Rik el 2 de Nov. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by