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 个评论

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by