Question

I have a matrix that is 31x48. I would like to plot everything but the first column of the matrix as this data is not important. for i = 1:22 plot(C1(i, :), 'color', 'b'), hold on end

Not sure how I can exclude the first column.

Was it helpful?

Solution

You can exclude the first column simply by the following code:

plot(C1(i, 2:size(C1,2)), 'color', 'b')

Now you will start from the second column element to the last element.

OTHER TIPS

No need for a loop. Use directly

plot(C1(1:22, 2:end).', 'b')

This works because plot with a matrix input plots each column of the matrix (note the transposition in the above line)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top