MATLAB - Script, Function & Debugging
MATLAB - Script, Function & Debugging
Debugging
Susovan Jana
Department of Information Technology
Institute of Engineering & Management, Kolkata, INDIA
Email (O): susovan.jana@iemcal.com
Email (P): jana.susovan2@gmail.com
2
What is a Script?
The simplest type of MATLAB® program is called a script.
Scripts are the simplest kind of program file because they
have no input or output arguments.
A script is a file that contains multiple sequential lines of
MATLAB commands and function calls.
They are useful for automating series of MATLAB
commands, such as computations that you have to
perform repeatedly from the command line or series of
commands you have to reference.
You can run a script by typing its name at the command
line.
Compare
Print
Search Files
Navigation
─ Forward
─ Back
─ Jump to a line
─ Find by text
Susovan Jana, Department of Information Technology, IEM, Kolkata, INDIA
9
Compare two Scripts
Save it as addition.m
Calling Function
─ result=addition(5, 2)
Execute the current line of the file and, if the line is a Step In dbstep in
call to another function, step into that function.