Ordering answers to calculations with lowest first
11 ビュー (過去 30 日間)
古いコメントを表示
Hi, I was wondering if there is a simple way to order answers to calculations in descending order. I have carried out around 16 similar calculations with numeric answers being output for each, however I'm trying to get them listed in order. Is this possible at all?
Thanks, Karen.
0 件のコメント
採用された回答
Walter Roberson
2011 年 5 月 6 日
They are scalar values each? Then
sort([bestimage,rachelbook,sym8book2,sym8book4],'descend')
その他の回答 (2 件)
Matt Tearle
2011 年 5 月 6 日
results = zeros(16,1);
for k = 1:16
results(k) = %do calculation
end
disp(sort(results))
Is that what you mean? (Probably not!)
1 件のコメント
Matt Fig
2011 年 5 月 6 日
Too fast! This was my only guess too. I hope Karen is storing the results of each calculation, and not wondering if we can make the algorithm spit out the answers in any order.
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!