实用标准文档
练习1: >> clear all >> s1=[1 0 1] s2=[1 3] s3=[1 1] s4=conv(s1,s2) Y=conv(s4,s3) X=[1 0 2 1] [Q,R]=deconv(Y,X) s1 =
1 0 1 s2 = 1 3 s3 = 1 1 s4 =
1 3 1 3 Y =
1 4 4 4 3 X =
1 0 2 1 Q =
1 4 R =
0 0 2 -5 -1 >> poly2sym(Q) ans = x + 4
>> poly2sym(R)
文案大全
实用标准文档
ans =
2*x^2 - 5*x - 1 >> conv(Q,X)+R-Y ans =
0 0 0 0 0 >> s1=[1 0 1] s2=[1 3] s3=[1 1] s4=conv(s1,s2) Y=conv(s4,s3) X=[1 0 2 1] [Q,R]=deconv(Y,X) s1 =
1 0 1 s2 = 1 3 s3 = 1 1 s4 =
1 3 1 3 Y =
1 4 4 4 3 X =
1 0 2 1 Q =
1 4 R =
0 0 2 -5 -1
poly2sym(Q)
文案大全
实用标准文档
ans = x + 4 poly2sym(R) ans =
2*x^2 - 5*x - 1 conv(Q,X)+R-Y ans =
0 0 0 0 0 2. x=1:10
y=[16 32 70 142 260 436 682 1010 1432 1960] p1=polyfit(x,y,1) y1=polyval(p1,9.5) 3. x=1:2:9 diff(x)
x=linspace(0,2*pi,100); y=sin(x); plot(x,y)
y1=diff(y)./diff(x); plot(x(1:end-1),y1)
x=ones(1,10) cumsum(x)
x=linspace(0,pi,100); y=sin(x); s=trapz(x,y) 练习2:
x=[7 10.5 13 17.5 34 40.5 44.5 48 56 61 68.5 76.5 80.5 91 96 101 104 106.5
文案大全
实用标准文档
111.5 118 123.5 136.5 142 146 150 157 158];
y1=[44 45 47 50 50 38 30 30 34 36 34 41 45 46 43 37 33 28 32 65 55 54 52 50 66 66 68];
y2=[44 59 70 72 93 100 110 110 110 117 118 116 118 118 121 124 121 121 121 116 122 83 81 82 86 85 68]; X=x./18*40; Y1=y1./18*40; Y2=y2./18*40;
t1=trapz(X,Y1),t2=trapz(X,Y2),t=t2-t1 4.
(1)>> student.number='20050731001'; >> student.name='jack';
>> student(2).number='20050731002'; >> student(2).name='lucy'; (2)
>>student(1).subject=[] >>student(1).sorce=[] >>student >>fieldnames(student)
>>getfield(student,{2},'name') >>student=rmfield(student,'subject')
>>student=setfield(student,{1},'sorce',90); >>stuent(2).sorce=88; (3)
>> A={'How are you!',ones(3);[1 2;3 4],{'cell'}}; >> B(1,1)={'Hello world'}; >> B(2,1)={[ 1 2 3 4]}; (4)
>>ans1=A(1,1) >> ans2=A{1,1} >> whos ans1 ans2
>> celldisp(A)
文案大全
实用标准文档
>> a1=A{2,1}(1,2) >>[a2 a3]=deal(A{1:2})
五 . 实验原始记录
文案大全