how to plot multiple curves on one graph

21 ビュー (過去 30 日間)
andrew
andrew 2012 年 1 月 13 日
Hi,
I want to graph multiple curves on one graph. For example, one curve looks like:
x = [2,2,2,2,2]; (this represents number of vehicles)
y = [5,10,15,20,25]; (this represents number of nodes)
z = [6.3, 8.2, 7.3, 14.1, 73.4]; (this represents time taken)
This creates a curve that looks exponential, but I want to also overlay other curves like the following onto it (the overall graph should look almost like a ramp and a plot that shows the contour or surface would even be better).
x = [3,3,3,3,3];
y = [5,10,15,20,25];
z = [7.3, 10.2, 11.3, 22.1, 90.4]
Furthermore, if there is a way to fit an exponential curve to this, that would be even better.
Thank you so much for your help
Drew

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 1 月 13 日
plot3(x1,y1,z1,'b*-',x2,y2,z2,'ro:');
or
plot3(x1,y1,z1,'b*-');
hold on
plot3(x2,y2,z2,'ro:');

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by