Matlab Cheatsheet Page 3

ADVERTISEMENT

Helpful Matlab commands
• add = +
• subtraction = -
• multiplication = +
• division = /
• det(D) : determinant of a square matrix
• dot(A,B): dot product of two vectors
• cross(A,B): cross product of two vectors
• norm(A): Magnitude of a vector
• cos(x) acos(x)
• sin(x) asin(x)
• tan(x) atan(x)
• cot(x) acot(x)
• csc(x) acsc(x)
• sec(x) asec(x)
• atan2(x,y)
Careful!!! Matlab defaults to radians, so if you want to use degrees you have 2 options:
• Cosd = cosine(in degrees)
OR
To convert from radians to degrees
• rad2deg (deg2rad also exists)
• Do the math itself
• pi is predefined in Matlab as ?pi?
4

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 3