文档介绍:数学试验答案
Chapter 1
Page20,ex1
(5) 等于[exp(1),exp(2);exp(3),exp(4)]
(7) 3=1*3, 8=2*4
(8) a为各列最小值,b为最小值所在的行号
(10) 4;
c=[15 14 14 14 14 15 16 18 20 22 23 25 28 ...
31 32 31 29 27 25 24 22 20 18 17 16];
plot(t,c)
Page 45 ex6
(1)
x=-2::2;y=x.^2.*sin(x.^2-x-2);plot(x,y)
y=inline('x^2*sin(x^2-x-2)');fplot(y,[-2 2])
(2)参数方法
t=linspace(0,2*pi,100);
x=2*cos(t);y=3*sin(t); plot(x,y)
(3)
x=-3::3;y=x;
[x,y]=meshgrid(x,y);
z=x.^2+y.^2;
surf(x,y,z)
(4)
x=-3::3;y=-3::13;
[x,y]=meshgrid(x,y);
z=x.^4+3*x.^2+y.^2-2*x-2*y-2*x.^2.*y+6;
surf(x,y,z)
(5)
t=0::2*pi;
x=sin(t);y=cos(t);z=cos(2*t);
plot3(x,y,z)
(6)
theta=linspace(0,2*pi,50);fai=linspace(0,pi/2,20);
[theta,fai]=meshgrid(theta,fai);
x=2*sin(fai).*cos(theta);
y=2*sin(fai).*sin(theta);z=2*cos(fai);
surf(x,y,z)
(7)
x=linspace(0,pi,100);
y1=sin(x);y2=sin(x).*sin(10*x);y3=-sin(x);
plot(x,y1,x,y2,x,y3)
page45, ex7
x=-::;
y=*(x>)+x.*(x<=).*(x>=-)-*(x<-);
plot(x,y)
page45,ex9
clear;close;
x=-2::2;y=x;
[x,y]=meshgrid(x,y);
a=;b=;
p=a*exp(-*y.^2-*x.^2-*x).*(x+y>1);
p=p+b*exp(-y.^2-6*x.^2).*(x+y>-1).*(x+y<=1);
p=p+a*exp(-*y.^2-*x.^2+*x).*(x+y<=-1);
mesh(x,y,p)
page45, ex10
lookfor lyapunov
help lyap
>> A=[1 2 3;4 5 6;7 8 0];C=[2 -5 -22;-5 -24 -56;-22 -56 -16];
>> X=lyap(A,C)
X =
- -
-
-
Chapter 3
Page65 Ex1
>> a=[1,2,3];b=[2,4,3];a./b,a.\b,a/b,a\b
ans =
ans =
2 2 1
ans =
一元方程组x[2,4,3]=[1,2,3]的近似解
ans =
0 0 0
0 0 0
矩阵方程[1,2,3][x11,x12,x13;x21,x22,x23;x31,x32,x33]=[2,4,3]的特解
Page65 Ex 2
(1)
>> A=[4 1 -1;3 2 -6;1 -5 3];b=[9;-2;1];
>> rank(A), rank([A,b]) [A,b]为增广矩阵
ans =
3
ans =
3 可见方程组唯一解
>> x=A\b
x =
(2)
>> A=[4 -3 3;3 2 -6;1 -5 3];b=[-1;-2;1];
>> r