Simple Sorting Methods

This submission includes four sorting algorithms and a test demo.
266 Downloads
Aktualisiert 13. Jul 2015

Lizenz anzeigen

This submission includes four sorting algorithms and a test demo. The algorithms include, Bubble Sorting Algorithm, Cocktail Sorting Algorithm, Insertion Sort Algorithm, and Odd-Even Sorting Algorithm. These algorithms receive a vector and sort the elements of the vector and return it in an output vector.
For Example for using the bubble sort algorithm, you can do as follows:
>> A = rand(1,100) % a vector including 100 random variables
>> SortedA1 = bubbleSort(A);
To understand the algorithms you can google them and check for instance the upcoming wikipedia pages.
To test all the algorithms at once you can run the demo

>> testSorting

Zitieren als

Reza Ahmadzadeh (2024). Simple Sorting Methods (https://www.mathworks.com/matlabcentral/fileexchange/52077-simple-sorting-methods), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.1.0.0

Added a new sort algorithm

1.0.0.0

Added a snapshot