delete rows based on whether the value in column 10 of the respective row is equal to one or not
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I tried to solve the problem described above with the following formula:
dataset=[dataset,delete];
rowsToDelete8 = dataset(:,10)==1;
dataX(rowsToDelete8, :) = [];
While doing this, I get the following error message:
Index of element to remove exceeds matrix dimensions.
Error in deleteSeriesWithOnlyFourElements (line 67)
dataX(rowsToDelete8, :) = [];
I do not really understand why it's not working
0 件のコメント
採用された回答
Image Analyst
2013 年 4 月 24 日
rowsToDelete8 was based on looking at dataset, not dataX, but then you try to use it in dataX, which is evidently not the same size as dataset.
Also, don't use "delete" as the name of a variable like you did in "dataset=[dataset,delete];"
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!