Plotting two continuous figures
2 ビュー (過去 30 日間)
古いコメントを表示
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
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 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!