08-12-2012, 03:18 PM
Introduction to Matlab
Introduction to Matlab.ppt (Size: 447 KB / Downloads: 199)
What is Matlab?
Matlab is basically a high level language which has many specialized toolboxes for making things easier for us
How high?
What are we interested in?
Matlab is too broad for our purposes in this course.
The features we are going to require is
Writing User Defined Functions
Functions are m-files which can be executed by specifying some inputs and supply some desired outputs.
The code telling the Matlab that an m-file is actually a function is
You should write this command at the beginning of the m-file and you should save the m-file with a file name same as the function name
Notes:
“%” is the neglect sign for Matlab (equaivalent of “//” in C). Anything after it on the same line is neglected by Matlab compiler.
Sometimes slowing down the execution is done deliberately for observation purposes. You can use the command “pause” for this purpose