how we can select 2 or more variables from an array depending on their values.
1 次查看(过去 30 天)
显示 更早的评论
like i have an array of say 100 variables.i want to select 4 variables from this array whose values are maximum in that array.what kind of command is available rather than max in matlab?
采纳的回答
Andrei Bobrov
2013-11-27
编辑:Andrei Bobrov
2013-11-27
[value1,index1] = sort(A,'descend');
out = [value1(1:4),index1(1:4)];
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!