How can I plot the same index from two arrays?
Ältere Kommentare anzeigen
There are two arrays consisting of 1440 elements each. (for y-axis)
T_start1= {}; %start time

T_end = {}; %end time

x = 1:1:1440 %nodes (x-axis)
I'm trying to figure out how to combine these two arrays (T_start1 and T_end). For example, the first element of T_start1 is paired with the first element of T_end to get a vertical line.

Instead of having two different plot lines, is it possible to do this? That means the first element paired with the other first element. This go on for the other elements. Is it possible?

Current code:
T_start1= {}; %start time
T_end = {}; %end time
figure(4);
x = 1:1:1440 %nodes
y1 = cell2mat(T_start1);
m = cell2mat(T_end);
plot (x,y1,x,m)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

