Question? Leave a message!




Matlab lecture notes ppt

matlab lecture notes pdf and matlab programming lecture notes and matlab simulink lecture notes
NancyWest Profile Pic
NancyWest,Germany,Professional
Published Date:12-07-2017
Website URL
Comment
MATLAB LECTURE NOTES Dr. ADİL YÜCEL Istanbul Technical University Department of Mechanical Engineering MATLAB LECTURE NOTES Student Name Student ID Dr. ADİL YÜCEL Istanbul Technical University Department of Mechanical Engineering MATLAB LECTURE NOTES LESSON 1 INTRODUCTION Dr. ADİL YÜCEL Istanbul Technical University Department of Mechanical Engineering • MATLAB stands for MATrix LABoratory. • MATLAB was invented by Cleve Moler in the late 1970s. • MATLAB is written in C. • MATLAB works as an interpreter. • MATLAB works slower than C and Fortran. • MATLAB has many toolboxes for different disciplines. • MATLAB has many visualisation tools. This section lists the Command Window Workspace shows the Command History script and function is the main window names and values of lists the copy of the files in your working that you write your the variables defined commands you have folder commands by the user run on the command window clc Clears the command window. Does not delete any variable. home Move cursor to the upper left corner of the command window. clear Deletes all the variables. clear variable name Deletes a certain variable. who Lists the names of the variables defined by the user. whos Lists detailed information about the variables defined by the user. beep Produce a beep sound. computer Identify the computer on which MATLAB is running. realmin Smallest positive real number. realmax Largest positive real number. date Shows the current system date. disp ( variable name ) Displays the value of the variable. disp ( string constant ) Displays the string constant. ans Automatically created variable when the result of an operation is not assigned to a variable. pi Mathematical π constant. % Used for writing a comment. ; Used for suppressing a variable or the result of an operation. + : Plus – : Minus : Matrix multiplication . : Array multiplication (Element wise) : Matrix power . : Array power (Element wise) \ : Backslash or left division / : Slash or right division .\ : Left array division (Element wise) ./ : Right array division (Element wise) : : Colon ‘ : Transpose = : Assignment == : Equal to = : Not equal to : Greater than : Less than = : Greater than or equal to = : Less than or equal to & : Logical AND : Logical OR : Logical NOT true : Logical TRUE false : Logical FALSE abs (x) Calculates absolute value of x ceil (x) Rounds x to the next integer floor (x) Rounds x to the previous integer round (x) Rounds x to the nearest integer exp (x) x Calculates exponential of x (e ) log (x) Calculates natural logarithm of x (lnx) log2 (x) Calculates base 2 logarithm of x (log x) 2 log10 (x) Calculates base 10 logarithm of x (log x) 10mod (x,a) Calculates modulus of x (x mod a) sqrt (x) Calculates square root of x nthroot (x,n) th Calculates n root of x factorial (x) Calculates factorial of x (x) sin (x) Calculates sine of x sinh (x) Calculates hyperbolic sine of x asin (x) Calculates inverse sine of x asinh (x) Calculates inverse hyperbolic sine of x cos (x) Calculates cosine of x cosh (x) Calculates hyperbolic cosine of x acos (x) Calculates inverse cosine of x acosh (x) Calculates inverse hyperbolic cosine of x tan (x) Calculates tangent of x tanh (x) Calculates hyperbolic tangent of x atan (x) Calculates inverse tangent of x atanh (x) Calculates inverse hyperbolic tangent of x sind (x) Calculates sine of x (x in degrees) cosd (x) Calculates cosine of x (x in degrees) tand (x) Calculates tangent of x (x in degrees) cotd (x) Calculates cotangent of x (x in degrees) secd (x) Calculates secant of x (x in degrees) asind (x) Calculates inverse sine of x (result in degrees) acosd (x) Calculates inverse cosine of x (result in degrees) atand (x) Calculates inverse tangent of x (result in degrees) acotd (x) Calculates inverse cotangent of x (result in degrees) asecd (x) Calculates inverse secant of x (result in degrees) format short 4 decimal places (3.1416) format short e 4 decimal places with exponent (3.1416e+000) format long Many decimal places (3.141592653589793) format long e Many decimal places with exponent (3.141592653589793e+000) format bank 2 decimal places (3.14)