Professional Documents
Culture Documents
ans =
9.1765
>> 56+72-16/4*8+50
ans =
146
>> 34/6+186-57*12
ans =
-492.3333
>>27^4*15+120-48
ans =
7971687
>> sqrt(65536)+35-124/12
ans =
280.6667
>> sqrt(175+256*12/8)
ans =
23.6432
>> 105+23-58*25-100
ans =
-1422
>> ans+34/6+186-57*15
ans =
-2.0853e+03
>> cos(pi/3)
ans =
0.5000
>>
sin(pi/2)+cos(pi/3)
ans =
1.5000
>>
tan(pi*4)+cos(pi*3)
ans =
-1.0000
>>
sin(pi/4)+tan(pi/2)-cos(pi/2)
ans =
1.6331e+16
>>History
Figures
ans =
1.6331e+16
>>
sin(pi/4)+tan(pi/2)-cos(pi/2)
>>
A=[6 9 7 8 11 9; 12 9 8 4 10 7; 6 14 9 6 9 6; 8 4 7 9 11 5; 4 12 9 6 8 10]
A=
6 9 7 8 11 9
12 9 8 4 10 7
6 14 9 6 9 6
8 4 7 9 11 5
4 12 9 6 8 10
>>
A(4,5)
ans =
11
>>
A(2,3)
ans =
>>
A(3,:)
ans =
6 14 9 6 9 6
>>
A(:,4)
ans =
9
6
>>History
Figures
>>
A=[9 8 5 15 20 1; 1 19 8 5 10 7; 6 16 19 6 8 6; 5 4 3 9 11 2; 3 16 19 26 38 10]
A=
9 8 5 15 20 1
1 19 8 5 10 7
6 16 19 6 8 6
5 4 3 9 11 2
3 16 19 26 38 10
>>
A(5,6)
ans =
10
>>
A(3,1)
ans =
>>
A(5,:)
ans =
3 16 19 26 38 10
>>
A(:,6)
ans =
1
10
>>History
Figures
>>
E=zeros(9,7)
E=
Columns 1 through 6
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
Column 7
0
0
>>
U=ones(10,6)
U=
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
>>History
Figures
>>
t= 12 : 4 : 256
t=
Columns 1 through 6
12 16 20 24 28 32
Columns 7 through 12
36 40 44 48 52 56
Columns 13 through 18
60 64 68 72 76 80
Columns 19 through 24
84 88 92 96 100 104
Columns 25 through 30
Columns 31 through 36
Columns 37 through 42
Columns 43 through 48
Columns 49 through 54
Columns 55 through 60
252 256
>>History
Figures
>>
t= 115 : -1.5 : 5
t=
Columns 1 through 3
Columns 4 through 6
Columns 7 through 9
Columns 10 through 12
Columns 13 through 15
Columns 16 through 18
92.5000 91.0000 89.5000
Columns 19 through 21
Columns 22 through 24
Columns 25 through 27
Columns 28 through 30
Columns 31 through 33
Columns 34 through 36
Columns 37 through 39
Columns 40 through 42
56.5000 55.0000 53.5000
Columns 43 through 45
Columns 46 through 48
Columns 49 through 51
Columns 52 through 54
Columns 55 through 57
Columns 58 through 60
Columns 61 through 63
Columns 67 through 69
Columns 70 through 72
Columns 73 through 74
7.0000 5.5000
>>History
Figures
>>
linspace (3,7,11)
ans =
Columns 1 through 3
Columns 4 through 6
Columns 7 through 9
5.4000 5.8000 6.2000
Columns 10 through 11
6.6000 7.0000
>>
logspace(-5,5,12)
ans =
1.0e+05 *
Columns 1 through 3
Columns 4 through 6
Columns 7 through 9
Columns 10 through 12
>>