113_1_MATLAB TUTORIAL

# 113_1_MATLAB TUTORIAL - MATLAB TUTORIAL(MATrix LABoratory...

This preview shows pages 1–4. Sign up to view the full content.

1 MATLAB TUTORIAL ( MAT rix LAB oratory) EE113 – Fall 2010 (taught by Prof. Abeer Alwan) Navigating in MATLAB

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Frequently used matrix operators accessing elements of an array or matrix usage – a(i), a(i, j), a(i, j, k) etc. ( ) matrix/vector transpose concatenation operator [x, y] : column-wise concatenation, [x ; y] : row-wise concatenation [ ] colon operator for generating and indexing arrays and matrices usage – {initial value} : {increment/decrement} : {final value} : element-by-element multiplication, division and exponentiation for matrices .*, ./, .^ scalar/matrix addition, scalar/matrix subtraction, scalar/matrix multiplication (orders must be compatible), scalar division, scalar exponentiation +, -, *, /, ^ Basic math using MATLAB Some pre-defined constants a) i = j = b) pi = 3.1416 c) Inf ( x/0 or overflow of a variable) d) NaN ( 0/0 or Inf–Inf ) Some commonly used functions 1 - magnitude , argument , complex conjugate , real part and imaginary part of a complex number abs(), angle(), conj(), real(), imag() square root of a number (again, arguments can be negative) sqrt() exponential , natural logarithm and logarithm to base 10 . Note : arguments to log() and log10() can be negative ! exp(), log(), log10() sine , cosine and tangent of an angle (in radians), and their corresponding inverses sin(), cos(), tan(), asin(), acos(), atan()
3 Commonly used array and matrix functions Ex: >> A = ones(3,3);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/28/2011 for the course EE 113 taught by Professor Walker during the Winter '08 term at UCLA.

### Page1 / 5

113_1_MATLAB TUTORIAL - MATLAB TUTORIAL(MATrix LABoratory...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online