下面哪段语句不会报错?
A: x = ones(1,4);nh = 0:2;h = (nh+1)* ones(1,3);n=0:5;y=conv(x,h);stem(n,y);
B: x = [1 2 3];h = ones(1,5);n=0:7;y=conv(x,h);stem(n,y);
C: x = ones(1,5);nh = 0:2;h = (nh+1).* ones(1,3);n=0:6;y=conv(x,h);stem(n,y);
A: x = ones(1,4);nh = 0:2;h = (nh+1)* ones(1,3);n=0:5;y=conv(x,h);stem(n,y);
B: x = [1 2 3];h = ones(1,5);n=0:7;y=conv(x,h);stem(n,y);
C: x = ones(1,5);nh = 0:2;h = (nh+1).* ones(1,3);n=0:6;y=conv(x,h);stem(n,y);
举一反三
- 下面哪段语句不会报错? A: x = [1 2 3];h = ones(1,5);n=0:7;y=conv(x,h);stem(n,y); B: x = ones(1,4);nh =0:2;h = (nh+1) ones(1,3);n=0:5;y=conv(x,h);stem(n,y); C: x = ones(1,5);nh =0:2;h = (nh+1). ones(1,3);n=0:6;y=conv(x,h);stem(n,y);
- 以下程序的输出结果是( )。 struct HAR { int x, y; struct HAR *p;} h[2]; main(){ h[0].x=1; h[0].y=2; h[1].x=3; h[1].y=4; h[0].p=&h[1]; h[1].p=h; printf("%d %d\n",(h[0].p)->x,(h[1].p)->y); }
- 设X ~ N ( 0 , 1 ),Y ~ N ( 0 , 1 ),且X与Y相互独立,则D(X – Y) = ( ). A: 1 B: 2 C: 3 D: 4
- 已知序列x(n)={1,2,3} ,h(n) ={1,1,1},n=0,1,2。y()是x()和h()的线性卷积, y(2)=( )。 A: 1 B: 3 C: 5 D: 6
- 【单选题】分段函数: ,下面程序段中正确的是__________。 A. If x < 0 Then y = 0 If x < 1 Then y = 1 If x < 2 Then y = 2 If x >= 2 Then y = 3 B. If x >= 2 Then y = 3 If x >= 1 Then y = 2 If x > 0 Then y = 1 If x < 0 Then y = 0 C. If x < 0 Then y = 0 ElseIf x > 0 Then y = 1 ElseIf x > 1 Then y = 2 Else y = 3 End If D. If x > =2 Then y = 3 ElseIf x > =1 Then y = 2 ElseIf x > =0 Then y = 1 Else y = 0 End If