Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Introduction to MATLAB Scripts

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.
Introduction to Matlab Scripts from Shameer Ahmed Koya


This post first appeared on Electrical Engineering Tutorial, please read the originial post: here

Share the post

Introduction to MATLAB Scripts

×

Subscribe to Electrical Engineering Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×