How do I plot together 5 different arrays?

1 view (last 30 days)
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?

Accepted Answer

Chetan Bhavsar
Chetan Bhavsar on 1 Oct 2021
Edited: Chetan Bhavsar on 1 Oct 2021
for example,
In file 1
x = linspace(-pi,pi);
y1 = sin(x);
hold on
In file 2
x = linspace(-pi,pi);
y2 = cos(x);
% holf off if its last file or you can continue hold on
hold off
Chetan Bhavsar
Chetan Bhavsar on 1 Oct 2021
You can do that with hold i think just put hold on after you plot command in all 5 files
hold on

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!