Remove elements in Matrix
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I plotted Position vs Time data. The user is then able to click and select points that are bad(noise). No problem so far. What is the best way to remove the selected points from the Position and Time matrices? I have a list of the indices for the points being removed.
0 Commenti
Risposta accettata
Walter Roberson
il 12 Ott 2011
Position(TheIndices) = [];
Time(TheIndices) = [];
4 Commenti
Walter Roberson
il 18 Ott 2011
if ~isempty(TheIndices)
sz = size(Position);
Position(TheIndices) = [];
Time(TheIndices) = [];
Position(prod(sz)) = 0; %0 fill
Time(prod(sz)) = 0; %0 fill
Position = reshape(Position,sz);
Time = reshape(Time,sz);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!