How to order a set of data from highest to lowest or lowest to highest?using FOR
2 ビュー (過去 30 日間)
古いコメントを表示
I have to order a set of data from highest to lowest or lowest to highest using the FOR random data can be I can not use the max command
Thanks for your help
0 件のコメント
回答 (2 件)
John D'Errico
2012 年 1 月 12 日
Don't you think you should be doing your own homework? Really, you gain more by doing it yourself.
Ok. Just this once, I'll do it for you. This solution employs for but not max.
for i = 1:1
M = sort(dataset(:),'ascend');
end
Enjoy. I'll let you figure out how to do it in descending order.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!