load x,y
古いコメントを表示
if x = [1 2 3 ...... 10]
y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ]
y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3]
how can I make save (x,y) and (x,y1) then do load it
then plot it
採用された回答
その他の回答 (1 件)
Timo Dietz
2020 年 11 月 17 日
0 投票
There are certainly different ways to do so.
E.g.:
x = 1:1:10;
y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ];
y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3];
save('filename', 'x', 'y1', 'y2') ;
data = load('filename');
plot(data.x, data.y1);
plot(data.x, data.y2);
5 件のコメント
abdullah qasim
2020 年 11 月 17 日
Timo Dietz
2020 年 11 月 17 日
Not sure whether I got your point.
Do you want to know how to plot both traces in one figure or something else?
abdullah qasim
2020 年 11 月 17 日
Timo Dietz
2020 年 11 月 18 日
編集済み: Timo Dietz
2020 年 11 月 18 日
For plotting multiple traces in one diagram, use the "hold" command in order to prevent the plot from being cleared:
plot(data.x, data.y1);
hold on;
plot(data.x, data.y2);
abdullah qasim
2020 年 11 月 18 日
カテゴリ
ヘルプ センター および File Exchange で Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!