Sorting using a while loop without sort command

2 ビュー (過去 30 日間)
Petch Anuwutthinawin
Petch Anuwutthinawin 2021 年 6 月 12 日
編集済み: Jan 2021 年 6 月 12 日
I need to make a funciton that given a vectoral input, outputs a vector of those elements sorted in ascending order. I dont know where to start with this.
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 6 月 12 日
https://en.m.wikipedia.org/wiki/Sorting_algorithm
Jan
Jan 2021 年 6 月 12 日
編集済み: Jan 2021 年 6 月 12 日
Please post mire details: You do not know, how to start? Thenthe reader have to guess, that you have a computer, did install Matlab, read the Getting Started chapters and Matlab's Onramp already and know functions and while loops.
So did you start with this minimal code already?
function y = mysorting(x)
end
Remember, that the forum will not solve your homework. If you post a specific question, helping you to solve this is a supporting, niot a cheating. "don't know where to start" is not specific.

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

回答 (0 件)

カテゴリ

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