MATLAB Script or programs are sequences of MATLAB commands saved in plain text files. When you type the name of the script file at the MATLAB prompt the commands in the script file are executed as if you had typed them in command window. Code for a script is done in an Editor window and saved as m-file.
In case your code has errors, MATLAB will show an error message in the command window, when you try to run the program . Error message will be hyperlinked to the line in the file that caused the error.
Script variables are added to the workspace. If you use the same variables in another script, they will be modified by that script. This may result in a confusing mix of variables in the MATLAB workspace. Some times it may lead to a syntax error or may lead to subtle errors in the result.
0 comments:
Post a Comment