How can I plot the same index from two arrays?
显示 更早的评论
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)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

