EEE300004 - DIGITAL SIGNAL PROCESSING LAB 1 : Introduction to MATLAB TAN DINH THAI - 100042549 LAB DATE: 10/8/2018 SESSION 2:30PM - 4:30 PM TUTOR: Mehdi Korki I. INTRODUCTION MATLAB is the main program will be used in all labs of this subject. Scopes of the first lab: · Getting start with MATLAB, knows about syntax, simple commands and using help window. · Creating script files in MATLAB. · Study MATLAB's techniques, i.e vectorization, matrices. II. OBJECTIVE, METHODS AND TECHNIQUES: · Go through how to using help capability in MATLAB. . Make calculations with MATLAB command. · Learn about complex numbers. · MATLAB Array Indexing: colon, insert or taking out into a vector. · Creating and using Script Files to work about vectors, loops, plotting, run and save script files. RESULTS III. 1. Pre -lab Section: Using MATLAB to make calculations, variable name assignment, and practice complex numbers. The following pictures are my evidence for completing this section:
>> pi*pi - 10 ans = -0.1304 A 1 sin (pi/4) ans = 0.7071 1 1 ans ~~ 2 ans = 0.5000 > x = sin (pi/5) ; >> cos (pi/5) ans = 0. 8090 > A V = sart (1-x ** ) = 0.8090 1 ans ans = 0.8090 1 1 2 3+43. 3 = -3 + 45 2 = 3.0000 + 4.00001
>> abs ( [z, w]) ans = 5 5 >> conj (z+w) ans = 0.0000 - 8.00001 >> angle (z) ans = 0.9273 >> exp (j*pi) ans = -1.0000 + 0.0000i >> exp (j*[pi/4, 0, -pi/4]) ans = 0.7071 + 0.70711 1.0000 + 0.00001 0.7071 - 0.70711 >> jkl = 0:6 jkl = 0 1 2 3 4 5 6 >> jkl = 2:4:17 jkl = 2 6 10 14 >> jkl = 99 :- 1:88 The calculations were made by typing the function into Command Window of the MATLAB. The results of them are exactly to compare to results calculated by hand. Then, this pre-lab was checked by tutor. 2. Warm Up