Revision as of 13:07, 4 September 2008 by Cocker (Talk)

MATLAB and Complex Numbers Examples

Defining terms in matlab i =sqrt(-1)

Matlab will return ans = 0 + 1i

EX. a= 3+2i Finding the conjugate conj(a) Finding the real part real(a) Finding the imaginary part imag(a)

Sample Code

>> a=3+2i

a =3.0000 + 2.0000i

>> conj(a)

ans =3.0000 - 2.0000i

>> real(a)

ans =3

>> imag(a)

ans =2

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett