Filter löschen
Filter löschen

Removing 1 column of ydata

1 Ansicht (letzte 30 Tage)
Benjamin
Benjamin am 5 Jun. 2012
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 5 Jun. 2012
... 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 Kommentar
Benjamin
Benjamin am 6 Jun. 2012
Thanks so much Walter, still trying to learn MatLab and this did the trick perfectly.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by