MATLAB Answers

0

Plot cell array starting from the second element

Asked by Gaetano Pavone on 15 Oct 2019
Latest activity Commented on by Murugan C on 15 Oct 2019
wave.JPG
As reported into the image, i have a 356x1 cell named wave_heights.
How can I plot the elements of the cell starting form the second one?

  0 Comments

Sign in to comment.

Tags

Products


Release

R2019b

1 Answer

Answer by Murugan C on 15 Oct 2019
 Accepted Answer

hi, use below code to extract cell from 2 and plot.
cell_extra = a(2:end);
plot(cell_extra);

  2 Comments

It doesn't work.
cell_extra = wave_heights(2:end);
plot(cell_extra);
% Error using plot
% Invalid data argument.
cell_extra = wave_heights(2:end);
plot(cell2mat(cell_extra));

Sign in to comment.