plot corresponding rows of 2 matrices

조회 수: 2 (최근 30일)
MatG
MatG 2020년 9월 8일
답변: madhan ravi 2020년 9월 8일
Is there an easy way to use plot, or a similar plottign command, to plot rows of matrix X as x value vs rows of matrix Y as y value?
x=[1 2 3 4;1.5 2 3.4 4.3];
y=2*[1 2 3 4;1.5, 2 3.4, 4.3];
% I want to replace the following for loop
for i = 1:siz(x,1)
plot(x(i,:),y(i,:));hold on;
end

채택된 답변

madhan ravi
madhan ravi 2020년 9월 8일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by