i have two arrays in matlab code and i want to plot them by two lines on the same graph
조회 수: 29 (최근 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!