Extracting a submatrix based on conditions on first columns of a big matrix
22 ビュー (過去 30 日間)
古いコメントを表示
Najam us Saqib Fraz
2020 年 10 月 14 日
コメント済み: Najam us Saqib Fraz
2020 年 10 月 14 日
A small part of a big data is shown here !!. I want to extract a submatrix from this big data matrix and then perform operations.Extraction is purely based first coloumn values, for example if the values in first coloumn are greater than 527 and smaller than 580,it should extract a submatrix where entries in first coloumn are between 527 and 580 and have all coresponding coloumns from big data Matrix.Thanks
0 件のコメント
採用された回答
James Tursa
2020 年 10 月 14 日
BigMatrix = your big matrix
BigMatrix1 = BigMatrix(:,1); % 1st column
x = BigMatrix1 > 527 & BigMatrix1 < 580; % logical indexes of what you want
SubMatrix = BigMatrix(x,:); % the sub matrix
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!