*4\ MATLAB 7.7.0 (R2008b)
File Edit View Insert Tools Debug Desktop Window Help
O
4-»
c
'O P1 ife ź © Current Directory: H:\Documents\MATLAB
& i Editor - H:\Documents\MATLAB\bubbleSort.m o
14-
: O £3 ■ |
* % • >0 |
0 |
i s |
. M M + fii. |
□ - |
? X | |||
n|- |
1.0 |
+ |
• • |
1.1 |
X |
o/7% o/7% | Ot |
□
□ ? x Workspace
o
1 |
Dfunction A = bubbleSort (A) |
2 | |
3 - E |
Dfor i=length(A)-1:-1:1 |
4 - E |
3 for j = 2:i |
5 - E |
if A (j -1)>A (j) |
6 OO |
tmp = A(j-l); |
7 - |
A(j-l) = A (j); |
8 - |
A(j) = tmp; |
5 - |
end |
10 - |
end |
11 - |
end |
12 - |
- end |
13 |
Command Window
’ Stack:
bubbleSort ^
Name ^ |
Value |
Size |
Bytes |
Ba |
<100x1 double> |
100x1 | |
Bi |
99 |
1x1 | |
Bj |
2 |
1x1 | |
4 III ► |
Command History
Figures - Figurę 1
-»• n *
»
? X
.
□
Edit- 0
© Linked variables/expressions: A
4 Start
Stopped in debugger
_
I*