{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

matlab_final_quick_reference (1)

# matlab_final_quick_reference (1) - MatLab Syntax Quick...

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

MatLab Syntax Quick Reference Sheet Arithmetic + , - , * , / , \ , ^ , .* , ./ , .\ , .^ , Mathematical Functions sqrt( x ) nthroot( x ) sin( x ) acos( x ) tanh( x ) rem( n , m ) floor( x ) exp( x ) cos( x ) atan( x ) asinh( x ) max( v ) ceil( x ) log( x ) tan( x ) sinh( x ) factorial( n ) min( v ) fix( x ) log10( x ) asin( x ) cosh( x ) abs( x ) sign( x ) angle( x ) rand sind( x ) rem( x , y ) mod( x , y ) gcd( x , y ) lcd( x , y ) primes( x ) isprime( x ) round( x ) Mathematical Constants pi ( π 3 . 14159) i ( i = - 1) inf ( ) NaN (not a number) Functions function [out] = f(in) f = @(in) mathExpression; nargout nargin Matrix, Linear Algebra & Operations eye( n ) (identity matrix) inv( m ) (inverse of matrix) sparse( m ) (create sparse matrix) ones( n ) (size n vector of 1’s) zeros( n , m ) (0’s matrix) det( m ) (determinant) transpose( m ) : (colon operator) end dot( A , B ) linspace( a , b , np ) ; (semicolon) prod( A , B ) mean( M ) median( M ) sortrows( M ) flipud( M ) strcmp( s 1 , s 2 ) cross( A , B ) fliplr( M ) (single quote) strcmpi(s1,s2) find( M ) cross( A , B ) Data Analysis roots( p ) polyfit( x , y , n ) polyval( c , x 2 ) spline( x , y , x 2 ) interp1( x , y , x 2 , approach 2 ) fft( v ) Plots plot( x , y ) pause( s ) plot3( x , y , ,! z ) surf( x , y , ,! z ) loglog( x , y ) axis( [ ... ] )

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.

{[ 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