How to sort an array efficiently in Simulink?
32 ビュー (過去 30 日間)
古いコメントを表示
Rukmani Mohanganesh
2013 年 7 月 3 日
回答済み: Kirankumar Bacchewar
2021 年 10 月 15 日
I am trying to sort a given array in ascending order using Simulink blocks. Is there any block available which does this. If no, how could this be done efficiently in Simulink?
0 件のコメント
採用された回答
Kaustubha Govind
2013 年 7 月 3 日
If you have a license to the DSP System Toolbox, you can use the Sort block. Otherwise, use the MATLAB Function block to call the MATLAB sort function. I don't know enough about either implementation to comment on their efficiency.
0 件のコメント
その他の回答 (1 件)
Kirankumar Bacchewar
2021 年 10 月 15 日
Even the sort function from Matlab is not effecient, I see lot of overhead. In my case, the execution time reduced drastically after modifying(partial re-using) the generated code from Matlab sort in simulink. This modified code was then included back into the model as legacy code.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!