• Home
  • Swinburne University of Technology
  • Digital signal processing
  • Introduction to MATLAB for Digital Signal Processing

Introduction to MATLAB for Digital Signal Processing

Contents 0.0 Introduction 2 0.1 Objectives 2 0.2 Methods and Techniques. 2 1.0 Pre - Lab 4 1.3 Pre-Lab - Getting started 4 2.0 Warm - Up. 6 2.1 MATLAB array indexing 6 2.2 MATLAB script files 10 2.3 MATLAB sound (optional) 15 3.0 Lab Exercise : Manipulating Sinusoids with MATLAB 16 3.1 Theoretical calculations. 17 3.2 Complex amplitude 19 4.0 Conclusion 20 0.0 Introduction Lab 01 of the unit digital signal processing consists of three parts: 1. The prelab which consists of basic questions regarding matlab commands and mathematical operators. 2. The warm-up session which includes more advanced questions compared to the prelab - consisting both theoretical questions based on mathematical formulas and operations such as vectors and arrays and plotting simple graphs. 3. The lab exercise questions which are formulated on sinusoidal signals and theories and calculations based upon them. 0.1 Objectives This lab is based upon three main goals that are expected to achieve by the completion of it. They are, 1. Understanding the function of the help command in addition to the fundamental MATLAB commands and syntax. 2. Writing and revise unique script files individually and run them correctly. 3. Introducing to advanced programming techniques such as vectorization in MATLAB. 0.2 Methods and Techniques As for techniques and methods that were used in this lab: for the pre-lab basic MATLAB commands such as the assignment operator, exponential commands, creating a matrix and matrix calculations were used. This includes general mathematical calculations and formulas. To generate plots, it was done in three steps. First the variables with a mathematical value were introduced. Equations included the general formula for a sinusoid wave, and it was written using the introduced variables. Finally, the graph was plotted. For the lab exercise, first the code related to the problem was written down and the plot was generated. Next calculations were based on finding w, where w = 2nf. The phase was calculated from the equation Ø = - wtm . For the addition of two phasors, first the two equations were represented by the phasors. Then convert them to rectangular for and add the real and imaginary parts separately. Finally, the answer is again converted into polar form. All calculations are shown in the respective sections.