Remove elements in Matrix
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2011 年 10 月 12 日
Position(TheIndices) = [];
Time(TheIndices) = [];
4 件のコメント
Walter Roberson
2011 年 10 月 18 日
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);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!