1. x=-2; y=3 >> a=x^2+y^3 Ans: a = 31 2. b=x/(x+y^2) Ans: b=-0.2857 3. c= log10((2/5)*y) Ans: 0.0792 4. d= sqrt(abs(y))+ 2*(x^2) Ans: 9.7321 5. e= sin((pi*x)/8) Ans: -0.7071 6. f= abs(x+j*y) Ans: 3.6056 7. g= exp(j*atan(1)) Ans: 0.7071 + 0.7071i 2. a. A=[1 4 2], B=[2 3 4;-3 2 5 ;2 4 2] N= length(A) M= sum(A)/N Ans: N=3 and M=2.3333 b. R= sum (B(:,2)) A=length (B(:,2)) C= R/A Ans: C=3 c. S= B.*B Ans: S= 4 d. e. A*B Ans: 4 9 16 9 4 16 4 -6 19 25 28 A'*B Ans: ??? Error using ==> mtimes Inner matrix dimensions must agree. This is because for matrix multiplication # of columns in first matrix must equal to the # of rows in the second which is not the case here. 3. a. b. c. C=randn (1,100) max (C)= 1.5826 min (C)= -1.9353 std (D)= 1.7794 var(D)= 3.1662 prod(C)= 3.3147e-030 1. First click on the “Basic Signal Operations” applet. Practice using the various controls on this applet. What happens when you adjust the amplitude slider? Ans: When I adjusted the Amplitude slider, the y-coordinate of the graph changes. The graph grew taller as I moved upwards and downwards and coincided with the X-axis when amplitude became 0. 2. Describe what happens when you adjust the time shift slider on any of the signals x(t). Ans: The phase of the graph changes i.e phase shift occurs. 3. Repeat #2 when the time shift slider is applied to the signal x(-t). Ans: Basically the phase shift occurs similar to question number 2. 4. Plot the signal x(t) = u(t) and y(t) = u(t). The signal u(t) is the unit step function. Next, plot 3x(t – 2) + 3y(-t – 2). Ans: 5. Use the controls on the applet to demonstrate that if y(t) = rect(t – 0.5, 1), then y(-t + 1) = y(t). Ans: 6. If x(t) = u(t) and y(t) = rect(t – 0.5, 1), plot the graph of x(t + 1) + y(-t + 2). Ans: 7. If x(t) = rect(t – 0.5, 1), then plot the graph of rect(t, 1). Ans: 8. Plot the graph of the product exp(-t)u(t)sin(8t). To better understand what is happening mathematically, try filling in the following table (the values can be obtained by positioning the mouse over the graph of each signal, at which time the signal coordinates will turn red): exp(-t)u(t) 1.5 sin(8t) exp(-t)u(t)sin(8t) 9. Now bring up the applet called “Sinusoids”. Plot the signals cos(4t) and sin(4t). 9.