-
46
pages
-
English
-
Documents
Description
Edward Neuman
Department of Mathematics
Southern Illinois University at Carbondale
edneuman@siu.edu
This tutorial is intended for those who want to learn basics of MATLAB programming language.
Even with a limited knowledge of this language a beginning programmer can write his/her own
computer code for solving problems that are complex enough to be solved by other means.
Numerous examples included in this text should help a reader to learn quickly basic programming
tools of this language. Topics discussed include the m files, inline functions, control flow,
relational and logical operators, strings, cell arrays, rounding numbers to integers and MATLAB
graphics.
Files that contain a computer code are called mthe files. There are two kinds of m files: scrthe ipt
files and the function files. Script files do not take the input arguments or return the output
arguments. The function files may take input arguments or return output arguments.
To make the m file click on File next select New and click on M File from the pull down menu.
You will be presented with tMATLABhe Editor/Debugger screen. Here you will type your
code, can make changes, etc. Once you are done with typing, cli F cilek on , in the MATLAB
Editor/Debugger screen and select Save As… . Chose a name for your file, e.gfir., stgraph.m
and click on Save. Make sure that your file is saved in the directory that is in MATLAB's search
path.
If you have at least two files with duplicated names ...
-
Publié par
-
Langue
English