We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84710a3 commit cd4aac3Copy full SHA for cd4aac3
algorithms/sorting/select_sort.m
@@ -4,11 +4,11 @@
4
%%smallest element in the unsorted list
5
minimum_index=i;
6
for j=i+1:length(arrayToSort)
7
- if (arrayToSort(j) < arrayToSort(minimun_index))
8
- minimun_index=j;
+ if (arrayToSort(j) < arrayToSort(minimum_index))
+ minimum_index=j;
9
endif
10
endfor
11
-%%replace the element with the minimun value of the unsorted array
12
- arrayToSort([i minimun_index]) = arrayToSort([minimun_index i]);
+%%replace the element with the minimum value of the unsorted array
+ arrayToSort([i minimum_index]) = arrayToSort([minimum_index i]);
13
14
endfunction
0 commit comments