MATLAB: Plotting few lines using one matrix lineplotplotting Let's say I have two matrices x and y x = [1 2 3 1 2] y = [1 2 3 1 3] I want to plot two lines from it, first three points and then two last points. In the end I want to get this plot. Can I do it with Matlab? Best Answer plot(x(1:3),y(1:3))hold allplot(x(4:5),y(4:5)) Related SolutionsMATLAB: Plot corresponding rows of 2 matrices plot(x.', y.') MATLAB: Debug few lines Select the few lines and press F9 ("Evaluate Selection" - also from the menu)Check out Cell Mode Related QuestionPrint first few lines of outputHow to plot line with dotsWriting few lines to Excel cell
Best Answer