How do I plot together 5 different arrays?

2 ビュー (過去 30 日間)
HelpAStudent
HelpAStudent 2021 年 10 月 1 日
編集済み: C B 2021 年 10 月 1 日
Hi, I have 5 different arrays from different script of matlab. Who do I save this 5 arrays (the values in the array are foundamental) in another script and plot them all together?

採用された回答

C B
C B 2021 年 10 月 1 日
編集済み: C B 2021 年 10 月 1 日
for example,
In file 1
x = linspace(-pi,pi);
y1 = sin(x);
plot(x,y1)
hold on
In file 2
x = linspace(-pi,pi);
y2 = cos(x);
plot(x,y2)
% holf off if its last file or you can continue hold on
hold off
  2 件のコメント
HelpAStudent
HelpAStudent 2021 年 10 月 1 日
I don't really understand how it works. I will try to explain my problem better.
My program analyze different set of images from different folder (5 different folder). At the end of the analysis of one folder I have a matrix (or an array?) :1x21 double.
And If I plot that one only matrix I have a courve.
After if I change the destination of the folder I can analyze the second folder and obtain another array with a similar courve.
There is a way to store each matrix in the way and then at the end of the five analyzation of five different folder plot the courve all together?
C B
C B 2021 年 10 月 1 日
編集済み: C B 2021 年 10 月 1 日
You can do that with hold i think just put hold on after you plot command in all 5 files
hold on

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by