23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12<br />

<strong>Programming</strong> Tips<br />

Command and Function Syntax ..................... 12-3<br />

Syntax Help ...................................... 12-3<br />

Command and Function Syntaxes .................... 12-3<br />

Command Line Continuation ........................ 12-3<br />

Completing Commands Using the Tab Key ............. 12-4<br />

Recalling Commands .............................. 12-4<br />

Clearing Commands ............................... 12-5<br />

Suppressing Output to the Screen .................... 12-5<br />

Help .............................................. 12-6<br />

Using the Help Browser ............................ 12-6<br />

Help on Functions from the Help Browser ............. 12-7<br />

Help on Functions from the Command Window ......... 12-7<br />

Topical Help ...................................... 12-7<br />

Paged Output ..................................... 12-8<br />

Writing Your Own Help ............................ 12-9<br />

Help for Subfunctions and Private Functions ........... 12-9<br />

Help for Methods and Overloaded Functions ........... 12-9<br />

Development Environment ......................... 12-11<br />

Workspace Browser ................................ 12-11<br />

Using the Find and Replace Utility ................... 12-11<br />

Commenting Out a Block of Code .................... 12-12<br />

Creating M-Files from Command History .............. 12-12<br />

Editing M-Files in EMACS .......................... 12-12<br />

M-File Functions .................................. 12-13<br />

M-File Structure .................................. 12-13<br />

Using Lowercase for Function Names ................. 12-13<br />

Getting a Function’s Name and Path .................. 12-14<br />

What M-Files Does a Function Use? .................. 12-14<br />

Dependent Functions, Built-Ins, Classes ............... 12-15<br />

Function Arguments ............................... 12-16<br />

Getting the Input and Output Arguments ............. 12-16<br />

Variable Numbers of Arguments ..................... 12-16<br />

String or Numeric Arguments ....................... 12-17<br />

Passing Arguments in a Structure .................... 12-17<br />

xx<br />

Contents

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!