1
1
1
p=
>> t=p(5:34)
t=
w=
2 5 7 9 11 13
x=
12 15 17 19 21 23 25 27
y=
3 8 12 15 17 13
11 9 21 23 20 17
3 13 13 17 19 23
13 41 53 33 37 39
43 21 31 35 37 47
21 23 27 31 34 29
>> max(w)
ans =
13
>> min(x)
ans =
12
>> min(w,y)
ans =
2 5 7 9 11 13
2 5 7 9 11 13
2 5 7 9 11 13
2 5 7 9 11 13
2 5 7 9 11 13
2 5 7 9 11 13
>> mean(y)
ans =
Columns 1 through 5
Column 6
28.0000
>> cumprod(y)
ans =
Columns 1 through 4
3 8 12 15
33 72 252 345
Columns 5 through 6
17 13
340 221
6460 5083
239020 198237
8843740 9317139
300687160 270197031
>> cumsum(y)
ans =
3 8 12 15 17 13
14 17 33 38 37 30
17 30 46 55 56 53
30 71 99 88 93 92
q = integral(fun,0,Inf)
q=
0.4244
b. >> syms x y z
>> int(int(int(x*y.^2*z.^5,x),y),z)
ans =
(x^2*y^3*z^6)/36
3. a. >> a=[1:10]/10
a=
Columns 1 through 4
Columns 5 through 8
Columns 9 through 10
0.9000 1.0000
b. >> c=1./[2:20]
c=
Columns 1 through 4
Columns 5 through 8
Columns 9 through 12
Columns 17 through 19
c. >> c=1./[2:20:222]
c=
Columns 1 through 4
Columns 5 through 8
Columns 9 through 12