i have two arrays in matlab code and i want to plot them by two lines on the same graph
72 次查看(过去 30 天)
显示 更早的评论
i have two arrays in matlab code and i want to plot them by two lines on the same graph
0 个评论
回答(1 个)
Soniya Jain
2021-7-10
plot(Array1);
hold on;
plot(Array2);
hold off;
hold will retain current plot when adding new plots.
4 个评论
Soniya Jain
2021-7-10
编辑:Soniya Jain
2021-7-10
I guess you are trying to plot cell array as using {}, which is invalid argument in plot function, so you can first covert cell array to vector using
or
functions, and then try plotting.


另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!