Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to filter a datasheet?

3 ビュー (過去 30 日間)
Jasraj Soni
Jasraj Soni 2019 年 9 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I imported a datasheet from Excel in Matlab. So it is a table of 130 * 23 (rows = 130, columns = 23).
Now I have a column vector,
lets say
A = [1;4;6;10;23;25;35;44;60] // these values are basically the position of rows I want to filter from the table
So how to filter these rows and possibly import the result in a new table and also as an excel file?
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 9 月 10 日
Does "filter from the table" mean that you want to extract the rows with those indices?
NewTable = YourTable(A, :);
Does it mean that you want to remove those rows leaving all the other ones?
NewTable = YourTable;
NewTable(A,:) = [];
Does it mean that you want to extract the rows in which those particular A values appear in one particular column?
Jasraj Soni
Jasraj Soni 2019 年 9 月 10 日
Thank you Walter Roberson for your response.
Yes I wanted to extract the rows with those indices, so the first code is working.
Thank you once again.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by