フィルターのクリア

how to sort an array based on a specific column and display it in another array

1 回表示 (過去 30 日間)
sneha sharma
sneha sharma 2015 年 12 月 9 日
編集済み: Stephen23 2015 年 12 月 10 日
i have attached below an array named sector1 and want to sort the array based on the last column and display the type of the first element (minimum) after sorting as 'cm' and others as 'ch' as other column in same array
  3 件のコメント
sneha sharma
sneha sharma 2015 年 12 月 10 日
it is simply the type...it could be anything..
sneha sharma
sneha sharma 2015 年 12 月 10 日
attached below is the code...plz help

サインインしてコメントする。

回答 (1 件)

Stephen23
Stephen23 2015 年 12 月 10 日
編集済み: Stephen23 2015 年 12 月 10 日
[~,idx] = sort(sector1(:,end));
and use the index variable idx to sort whichever other variables you wish to.

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by