MATLAB: If I have an array that is size 2×60, how to plot row 2 vs. row 1

arraydataMATLABplot

Would it be plot(data(2,:),data(1,:))?

Best Answer

Would it be
plot(data(2,:),data(1,:))
Yes if you want row 2 as the x (independent) variable and row 1 as the y (dependent) variable. Otherwise, reverse them.
Related Question