You are on page 1of 140

. http://www.boosla.

com

, ,
, ,
, .
, ,
:
3 .........................................................................
5 ...................................................................................................
10 .................................................................................
16 ...................................................................................
24........................................................................
35........................................................................................................
44...................................................................
45......................................................................................
55...................................................................................
65............................................................................................................M-File
81........................................................................D Plotting2

84 ...........................................
88.....................................................................
91..................................................
94...................................................
99.....................................................................................
109........................................................................................
111..................................................................................
116...................................................................................
119...................................................................................... Zero Crossing
127..................................................................
131........................................................................................Curve Fitting
,

1 2 3

. http://www.boosla.com

, , ,


http://www.mathworks.com
, ,
( ( .
University of Utah
http://www.math.utah.edu/lab/ms/matlab/matlab.html

Indiana University
http://www.indiana.edu/~statmath/math/matlab/

. http://www.boosla.com


:
1 2 3 4 5 6 78 D Plotting29 D Plotting310 :
) (
,
differentiation Integration Algebric Equations
Differential Equations ,
, Partial fraction
, ,
Control
System, Mechanical Field, Electronics
Automotive Industry, Aerospace and Defense,
.
, Nissan
%50 Paper Model Based Design
Model Based Design,
) )
Without MathWorks tools for Model-Based Design, Nissan would not have become the first
company to meet the CARB PZEV standard
CARB= California Air Resources Board
PZEV= Partial Zero Emission Vehicle

http://www.mathworks.com/company/use...ml?by=industry

.

,

Computer Science
.
Hardware Intel Hypercube organization
Ardent Computer Mathworks ,
.

. http://www.boosla.com



Mathworks .
MIT 1978
M.S.E.E 1980

. http://www.boosla.com

:
,
, Command Window Workspace
,Command History .

:Command Window Inputs ,Commands


,
.
:Workspace Inputs
Outputs .
: , , Workspace
Workspace

. http://www.boosla.com

:Command History
.

:Start ,

4

, .
File
,

. http://www.boosla.com

Edit
) ,Copy ,Cut ,Paste ,(Find

Clear Command Window
Clear Command History
Clear Workspace

Debug
,
.

Stop If Errors/Warnings

. http://www.boosla.com

: , .

:Desktop

,
) ( ,

. http://www.boosla.com

:

:Docked .
-1
:Undocked
-2


:Window
, Command
Window .

:Help
, ,
, ,

. http://www.boosla.com


, )
( ,
.

""+
2+3 ,5

Workspace ,
,

. http://www.boosla.com

5 ,3 ,

. http://www.boosla.com

, ans ,
,3

. http://www.boosla.com

:
,1=2-3
) ( - ,


) * ( , ,180 =12*15

:
12 3 ,4
) ,( /

. http://www.boosla.com

:
) ^ ( , Shift + 6
, ,144=2^12

. http://www.boosla.com

:
,sqrt

. http://www.boosla.com


Qbasic C++ ,
.
, ) ,( %
,

,Workspace ,
ans ,

. http://www.boosla.com

, ,

. http://www.boosla.com

, .
, , ,
,
,

)
( ) ; (

. http://www.boosla.com

) (
,
) ; (

. http://www.boosla.com

. http://www.boosla.com


) ( i

, , ,


) ( ,
, ,Clear

. http://www.boosla.com

Clear

,
,

:
,
, Clear , & )(a
) (b

. http://www.boosla.com

) (a ,

. http://www.boosla.com


, ,
Trigonometric functions
Inverse Trigonometric functions
Hyperbolic Functions
Inverse Hyperbolic functions
: Trigonometric Functions
Built In Function
Trigonometric Function
sin
Sine
cos
Cosine
tan
Tangent
sec
Secant
csc
Cosecant
cot
Cotangent
: Radian

. http://www.boosla.com

Plotting 2D
:
Inverse Trigonometric Function
Inverse Sine
Inverse Cosine
Inverse tangent
Inverse Secant
Inverse Cosecant
Inverse Cotangent

Built In function
asin
acos
atan
asec
acsc
acot

http://www.boosla.com .

Hyperbolic functions
Built in functions
sinh
Cosh
Tanh
Sech
Csch
Coth

Inverse Hyperbolic functions


Hyperbolic Sine
Hyperbolic Cosine
Hyperbolic Tangent
Hyperbolic Secant
Hyperbolic Cosecant
Hyperbolic Cotangent

. http://www.boosla.com

. http://www.boosla.com

. http://www.boosla.com

http://www.boosla.com .


Built in function
Asinh
Acosh
Atanh
Asec
Acsc
Acot

Inverse Hyperbolic Functions


Inverse hyperbolic Sine
Inverse hyperbolic Cosine
Inverse hyperbolic tangent
Inverse hyperbolic secant
Inverse hyperbolic cosecant
Inverse hyperbolic cotangent

. http://www.boosla.com

) (z
.

. http://www.boosla.com


Exponential Function
Complex numbers and their Processes
Natural Logarithm
Absolute Value
Approximation Processes
Exponential Function

x =ey
exp

Complex Numbers
Real number
,Imaginary Numbers
z = z + y *i



,Phase Angle
Imaginary number
( angel = tan 1
)
Real number
:
Absolute Value= X 2 +Y 2
: ,

. http://www.boosla.com

: ) (
angle )angle(z
z ,
atan2

. http://www.boosla.com

Natural Logarithm
)log(x

,
Ceil , Floor

. http://www.boosla.com

Matrices








:
,

Polynomials, ,
.
:
, .

, ,
) Comma (, Space ,
)
( Enter Semicolon ( ; ),

. http://www.boosla.com

.

12345 :
.
:
A & B, m,
n.

. http://www.boosla.com

:

, .

1+7=8
:
,
2+8=10
,


A&B,
) (+ ,

. http://www.boosla.com



,

m
n

. http://www.boosla.com



n1
m2

. http://www.boosla.com

. http://www.boosla.com


,
,

,


X=-2
Y=3


1 2 ,

. http://www.boosla.com


X A B,


inv ) )
X & Y ,

. http://www.boosla.com

. http://www.boosla.com



Column Vector Row Vector




1 2 3 4 5 6 7 8 9

. http://www.boosla.com

, ,10 length
,

. http://www.boosla.com

120 , ,

: 120 ,11
,13 12 ,

. http://www.boosla.com


11 12 13
,

. http://www.boosla.com

, 100 1000 ,

1 10
1:10
10 1200
10:1200
11 13
11:13

. http://www.boosla.com



1 2 3 15

A(3)=15
A

. http://www.boosla.com



1 2- Square Brackets

. http://www.boosla.com

. http://www.boosla.com


,
Command Window

. http://www.boosla.com


, max,


, min
minimum


, sum

. http://www.boosla.com


, prod product

. http://www.boosla.com


,
1 2
1 2 3 4 5 6 7 8 9 10 11 Diagonal12-

. http://www.boosla.com


,
size, length, length
, ,
) (

size

. http://www.boosla.com


,
,

42 ,

, ,
.

31 54 13 11
,

. http://www.boosla.com


, ,
, ,

, ,


,
, ,

. http://www.boosla.com


,
, , ,
,

. http://www.boosla.com

, ,


,
,
, , ,

max

,
,

. http://www.boosla.com


,
min


sum
,

. http://www.boosla.com


,
, ,
,


, ,
) ( , diag,

. http://www.boosla.com


, ,
,
magic N ,
,
.

. http://www.boosla.com

. http://www.boosla.com

M-File
,

1 , .
2 , 3 , .
4 .
5 Debugging
, M-File
, ,
, .

. http://www.boosla.com

M-File
M-File,

. http://www.boosla.com

, ,

1 2 3 4 * + , - , & ,

1-

. http://www.boosla.com

2- ,training1

3- Command Window and Workspace

. http://www.boosla.com

4- M-File ,

. http://www.boosla.com

5 , , Command Window

. http://www.boosla.com

,
, CLC ,
.
M-File

. http://www.boosla.com

, CLC , Command
Window

. http://www.boosla.com

CLC
Workspace A,B,C

A,B,C D,E,F
Workspace

, Clear clc
Workspace ,
.
clear,

. http://www.boosla.com


plotting ,

linspace
, ,
,

10 5 15

. http://www.boosla.com

Randomization System in Matlab



randint
,
,

. http://www.boosla.com

Input
,
,
,

. http://www.boosla.com

. http://www.boosla.com

String and Character


string
character
string to Character

num2str
str2num

, input
string , ,
,

. http://www.boosla.com

str2num string character ,

. http://www.boosla.com

num2str
string , ,
, ,
string

. http://www.boosla.com

D Plotting2

independent dependent
independent Variable
dependent Variable
, plot

sine Wave

. http://www.boosla.com

10 Sine Wave , Sine Wave


. http://www.boosla.com

, ,

. http://www.boosla.com



, ,

, plot

. http://www.boosla.com

. http://www.boosla.com

) )

. http://www.boosla.com

. http://www.boosla.com


,
grid plot

. http://www.boosla.com

, ,
, Hold on plot
, hold off,

. http://www.boosla.com

. http://www.boosla.com



figure ,

plot figure
figure grid .

. http://www.boosla.com

. http://www.boosla.com

, ,

,
figure
close all clear


clc
clear
close all

. http://www.boosla.com


,
, subplot
plot
subplot ,
subplot ,
,

, ,

. http://www.boosla.com

1 , 2
,
subplot
subplot

. http://www.boosla.com

. http://www.boosla.com

[ ]

3 3 1 2 3 45
6 , 7
9

. http://www.boosla.com

. http://www.boosla.com


,
X-Axis xlabel
ylabel

ylabel

. http://www.boosla.com


title

. http://www.boosla.com

. http://www.boosla.com


, text

,
maximum point
find
,

. http://www.boosla.com

X Y,

X Y workspace,

. http://www.boosla.com

. http://www.boosla.com

legend
,
legend

. http://www.boosla.com

legend ,

,

. http://www.boosla.com

legend plot

. http://www.boosla.com



, axis,

. http://www.boosla.com



1 -102 103 -104 10

. http://www.boosla.com


,
,

, .
ginput ,

Enter .

,
10 ,
ginput, .

, Enter

. http://www.boosla.com

,
.


, X , Y & Z ,
X & Y , Z ,
,
meshgrid
X-Axis Y-Axis,
Y-Axis X-Axis,
.

. http://www.boosla.com

meshgrid
meshgrid mesh plot


X-Axis
,
.

X & Y

. http://www.boosla.com

X Y

. http://www.boosla.com


, , ,
, ,
.
1 2- Curve Fitting
3 4 5 ,

EVAL
, eval
, Sine Wave

string Workspace

t ,

. http://www.boosla.com

, ,
eval,
, ,

. http://www.boosla.com

. http://www.boosla.com

coefficients ,
, ,
,

. http://www.boosla.com

, ,
,
"="
, ,

x=1 , y=0,z=0
x
x=0, y=1, z=0
y
x=0,y=0,z=1
z
, D
.

. http://www.boosla.com

Zero Crossing
,
,

. http://www.boosla.com

, ,
,
Y=0 ,

. http://www.boosla.com

, Digital Domain, Digital


Domain
,
, ,
sine wave ,

. http://www.boosla.com

, ,

. http://www.boosla.com

Digital Domain

. http://www.boosla.com

,
,
, Digital Domain

. http://www.boosla.com

,
, ,

, ,
, ,

, y

. http://www.boosla.com

, , , y
, ,


. http://www.boosla.com


, ,
, ,
,
trapz
area
area

. http://www.boosla.com

trapz ,

. http://www.boosla.com

Workspace

, inputs
outputs ,
, .

. http://www.boosla.com

. http://www.boosla.com

Curve Fitting
Curve Fitting
, inputs
outputs ,
curve fitting .

ones zeros
ones 1
zeros

. http://www.boosla.com

Curve Fitting

1- linear
2- Quadratic
3- Sinusoidal
4- exponential
,
Linear Curve Fitting

,

. http://www.boosla.com


Linear Curve Fitting
,

Linear Curve Fitting

. http://www.boosla.com

K & T
X Y X & Y


X Y

X Y
X & Y

. http://www.boosla.com

Row Vector Column Vector


ones

K & T

A , ,
) \ (
inv

. http://www.boosla.com

. http://www.boosla.com


Exponential Curve Fitting

. http://www.boosla.com

Exponential Curve Fitting


Exponential Curve Fitting ,
X & Y

. http://www.boosla.com

. http://www.boosla.com

You might also like