Removing 1 column of ydata

Hi there, I was wondering if there was a way to delete a single column of ydata in a plot without having to do it manually each time?
Thanks, Ben

 Accepted Answer

... Just don't plot it?
not_col = 7; %for example
yt = ydata;
yt(:,not_col) = [];
plot(yt)
or
not_col = 7; %for example
plot( ydata(:, setdiff(1:size(ydata,2), not_col) ))

1 Comment

Thanks so much Walter, still trying to learn MatLab and this did the trick perfectly.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!