113_1_MATLAB TUTORIAL

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

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

View Full Document Right Arrow Icon
1 MATLAB TUTORIAL ( MAT rix LAB oratory) EE113 – Fall 2010 (taught by Prof. Abeer Alwan) Navigating in MATLAB
Background image of page 1

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

View Full DocumentRight Arrow Icon
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()
Background image of page 2
3 Commonly used array and matrix functions Ex: >> A = ones(3,3);
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online