フィルターのクリア

I have a .xls file that I have imported and I am needing to remove the min number from each row. going down by each row.

1 回表示 (過去 30 日間)
grades = xlsread('gradedata.xls');
B = grades.'
B = 8×8
10 10 10 9 8 9 4 10 9 9 4 8 4 8 8 10 8 10 3 7 7 5 6 10 9 10 5 6 5 9 7 10 4 8 7 4 6 7 5 10 9 7 9 7 7 6 9 10 2 6 5 9 9 4 10 9 8 8 6 8 10 10 8 10
B(sub2ind(size(B),1:size(B,2))) = [];
B = reshape(B,[],size(grades,1)).'
B = 8×7
10 9 10 10 8 7 6 8 10 4 3 5 7 9 5 6 9 8 7 6 4 7 9 8 8 4 7 5 6 7 9 10 9 8 5 9 7 6 4 10 4 8 6 7 5 9 10 8 10 10 10 10 10 10 9 10
This is what I got so far... but the output is not what I am looking for.

採用された回答

Walter Roberson
Walter Roberson 2023 年 3 月 1 日
[~, minidx] = min(B, 1);
Now you want to delete row minidx(1), column 1, row minidx(2), column 2, row minidx(3), column 3, and so on.
  4 件のコメント
Walter Roberson
Walter Roberson 2023 年 3 月 1 日
Sorry, I keep forgetting the [] is needed.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by