Bubble Sort a alternative way

Version 1.0.0.0 (2.62 KB) by Scott
Using a variable scrip to generate a Bubble Sort
222 Downloads
Updated 9 Dec 2013

View License

This is roughly based off Bubble Sort Project implement in EEC116 at UCDavis

http://www.ece.ucdavis.edu/~bbaas/116/hwk/project/
I was just trying to make it adaptable without using eval function. This was accomplished by creating a temp.m file that is generated at run time. This script consists of N cells where N is the length of the array. The numbers are sorted as you pass the values in. The scrip basically just repeat the call to the basic cell N times and each time it calls the cell it sorts and passes a value, then you increment and pass in a new value. This is not a viable alternative to the built in sort function as is much slower, but it is faster than trying the version using eval. Just want to see what type of feed back I get.

Cite As

Scott (2026). Bubble Sort a alternative way (https://www.mathworks.com/matlabcentral/fileexchange/44638-bubble-sort-a-alternative-way), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Shifting and Sorting Matrices in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0