How to plot 2d graph with various variables?

6 ビュー (過去 30 日間)
Berke Baser
Berke Baser 2022 年 10 月 26 日
コメント済み: David Hill 2022 年 10 月 27 日
Hey, ı have variables fitting for my project. I just want to graph something like that. What is this type of graph and what are the commands for it?
Thanks,

回答 (2 件)

David Hill
David Hill 2022 年 10 月 26 日
I just generated example matrices for x and y. x-rows are specific thurst for various c-values, y-rows are fuel consumption values for various a-values.
x=[350 380 400 410 411 345];
y=[.19 .192 .195 .198 .215 .285];
x=x+(10:10:50)';
y=y.*[1 .9 .85 .8 .75]';
plot(x',y');
hold on;
plot(x,y,'Marker','.')

Berke Baser
Berke Baser 2022 年 10 月 27 日
Well, ı have plotted smth like this with for loop function. Now, ı want to spline (get curved) these graphs. Could you help me with this?
Appendix;
S=reshape(S,6,5);
st=reshape(st,6,5);
hold on
for i=1:6
plot(st(i,:),S(i,:))
hold on
end
hold on
for i=1:5
plot(st(:,i),S(:,i));
hold on
end
grid on
for i=1:6
scatter(st(i,:),S(i,:),"filled")
end
hold on
for i=1:5
scatter(st(:,i),S(:,i),"filled");
end
  1 件のコメント
David Hill
David Hill 2022 年 10 月 27 日
Attach your data.

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-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