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

MATLAB Programming Tips Part 1

MATLAB program (functions and scripts) are stored as script file(.m files). This type of file contains Matlab commands, so running it is equivalent to typing all the commands—one at a time—at the Command window prompt. You can run the file by typing its name at the Command window.


Matlab Programming Tips Part 1 from Shameer Ahmed Koya
  • Both functions and scripts are stored in .m files
  • —Type up a bunch of commands and save as filename.m
  • —Type filename in command window to run
  • Example: first_program.m
  • —The name of a script file must begin with a letter, and may include digits and the underscore character, up to 63 characters.
  • —Do not give a script file the same name as a variable.
  • —Do not give a script file the same name as a MATLAB command or function.


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

Share the post

MATLAB Programming Tips Part 1

×

Subscribe to Electrical Engineering Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×