{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# chap02 - Chapter 2 MATLAB Fundamentals MATLAB Matrix...

This preview shows pages 1–13. Sign up to view the full content.

Chapter 2 Chapter 2 MATLAB MATLAB Fundamentals Fundamentals

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB MATLAB Matrix Laboratory Matrix Laboratory
Problem-Solving Methodology Problem-Solving Methodology State the problem clearly Describe the Input/Output (I/O) Work the problem by hand Algorithm - Numerical Method Develop a MATLAB Solution Debugging and Testing Documentation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Why MATLAB? Why MATLAB? Industry standard software application Wealth of built-in functions and libraries Toolboxes (add-on software modules) – image and signal processing, control systems design, fuzzy logic, etc. Has own structured programming language Ease of application and testing (pre- and post- processing without lots of programming and formatting) Platform independent
What is MATLAB? What is MATLAB? Both a computer programming language and a software Began as a set of tools to solve linear algebraic equations. Has grown to a complete scientific programming suite Interpretive programming language: Read script files and perform operations; generally not compiled Enhanced calculator / spreadsheet – much more flexible Complete visualization package and post-processing analysis suite

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB MATLAB MATLAB is a numerical analysis system Can write “programs”, but they are not formally compiled Should still use structured programming Should still use comments Comments are indicated by % ” at the beginning of the line
Comments!!! Comments!!! Program Documentation Program Documentation You must include comments in the computer programs you turn in – otherwise we will have great difficulty knowing what you are doing

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
For example, here is some cryptic code without comment for j=0:2 k=(2-j)*(1+3*j)/2 end What does it do? What does it do? Put a comment in Put a comment in % turns (0,1,2) into (1,2,0)
MATLAB Windows MATLAB Windows Command Window -- enter commands and data -- print results Graphics Window -- display plots and graphs Edit Window -- create and modify m-files

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Managing MATLAB Environment Managing MATLAB Environment who or whos -- See the current runtime environment clear -- remove all variables from memory clc -- clear the command window clf -- clear the graphics window save -- save the workspace environment load -- restore workspace from a disk file abort -- CTRL-C help -- help “command” Really good “ help ” command
MATLAB Syntax MATLAB Syntax No complicated rules Perhaps the most important thing to remember is semicolons (;) at the end of a line to suppress output Type “ more on ” to keep text from leaving screen too fast diary “filename” saves a text record of session diary off turns it off

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB MATLAB MATLAB’s basic component is a Vector or Matrix Even single value variables (Scalars) All operations are optimized for vector use Loops run slower in MATLAB than in Fortran (not a vector operation) size command gives size of the matrix
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 48

chap02 - Chapter 2 MATLAB Fundamentals MATLAB Matrix...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online