This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECEN 314: Signals and Systems Recitation 1: Introduction to MATLAB 1 Basic vector and matrix operations In MATLAB, signals are represented by vectors. A vector x containing values { 1 , 2 , 3 , 4 } is entered by using the following command: >> x=[1 2 3 4] Here, x is a row vector. It can be changed into a column vector by: >> x=[1; 2; 3; 4] Alternately, a row vector x , can be changed into a column vector or viceversa by sim ply issuing the following command: >> x Here, represents transpose. All the elements of x can be multiplied or divided by 2 by issuing the following commands: >> 2*x >> x/2 Let x = [1 2 3 4] and y = [5 6 7 8]. Suppose we want to multiply the first element of x with the first element of y , second element of x by the second element of y , and so on. This can be accomplished by using the following command: >> x.*y Notice the . in the above command. This represents element by element operation....
View
Full
Document
 Spring '08
 HALVERSON

Click to edit the document details