113_1_MATLAB TUTORIAL

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

This preview shows pages 1–3. 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 !
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern