MATLAB Basic Programming

Loops Construction

Addition

Addition2

Whileloop

Arctan(x) Power Series (Needed by piaprox)

Data functions


Branching Statements

Example 1: Grades

Example 2: Grades

Loopbreak

Loopbreak2

Euler Constant


Loading and Reading Data Files

data1 file

readdata file


Computers Limits

Thresholds

Thresholds Improved


Subtraction of nearly equal numbers

Forward differences

Centered differences


Graphing functions in the plane

Guide to graph functions in the plane. Need f1(x) and f2(x) defined below (Updated Oct 28, 2004)

Function f1(x) needed by GraphFunction.m

Function f2(x) needed by GraphFunction.m

Single Function

Multiple Functions 1

Multiple Functions 2

Calling and Plotting and External Function

External Function g(x)


Graphing Data Points in the Plane and Linear Interpolation Segments Using Asterisks and Different Colors

Points and Segements in the Plane


Defining and calling Subroutines

Subroutine for Integers Base Change

Principal Program


Graphing Grids

Subroutine for Graphing the Grids

Data1

Data2

Data3