第二章
班级:自动化1002班
姓名:许斌
学号:10401100107
2.9-2
>> A=[1.2 3 5 0.9;5 1.7 5 6;3 9 0 1;1 2 3 4];
>> A=magic(8)
A =
64 2 3 61 60 6 7 57
9 55 54 12 13 51 50 16
17 47 46 20 21 43 42 24
40 26 27 37 36 30 31 33
32 34 35 29 28 38 39 25
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1
>> B=A(2:2:end,:)
B =
9 55 54 12 13 51 50 16
40 26 27 37 36 30 31 33
41 23 22 44 45 19 18 48
8 58 59 5 4 62 63 1
2.9-3
>> syms x;f=x^5+3*x^4+4*x^3+2*x^2+3*x+6
f =
x^5+3*x^4+4*x^3+2*x^2+3*x+6
>> syms s x;f=x^5+3*x^4+4*x^3+2*x^2+3*x+6;subs(f,x,(s-1)/(s+1))
ans =
(s-1)^5/(s+1)^5+3*(s-1)^4/(s+1)^4+4*(s-1)^3/(s+1)^3+2*(s-1)^2/(s+1)^2+3*(s-1)/(s+1)+6