How to find the given index values in a array?
1 次查看(过去 30 天)
显示 更早的评论
I have a matrix having 17 rows and 41 colums (find the attachment)
How to find the values at the top from 2nd column to last column with respect to the first column corresponing values
0 个评论
采纳的回答
Andrei Bobrov
2019-4-25
in R2016b
T = readtable('Sheet2.xls','ReadVariableNames',0);
lo = T{:,2:end} ~= 0 & ~isnan(T{:,2:end});
[ii,~] = find(lo);
out = sortrows([T{:,2:end}(lo),T{:,1}(ii)],2);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!