1
: MATLAB
: , MATLAB.
:
1. , , .
2. MatLab.
3. ,
MatLab.
MATLAB
MATLAB (MATrix LABoratory) - , .
MATLAB , :
Command Window ( ) . , . .
Ø Command History ( ) , , Command Window ( ) .
Ø Workspace ( ) , .
Ø Current Directory ( ) , MATLAB . , , , .
. MATLAB. : , . >>. , , . . = . Enter .
:
a=2+51-37
Enter, :
a = 16
MATLAB . MATLAB, File\ Save Workspace As . mat, -. : File \ Load Workspace .
double
MATLAB , , 2.85093+11, 10. double. MATLAB short , .
|
|
:
res=5.345*2.868/3.14-99.455+1.274
:
res = -93.2990
res, :
format long
res
Enter :
res = -93.29900636942675
MATLAB. , ( Enter) :
format short
MATLAB , , ( : round, : fix). mod , sign , lcm , perms nchoosek . , .
. . ( 1):
1, 0. , .
:
a=1; b=2; c=3;
res=(a<b)+(c~=b)+(b==a)
:
res = 2
, 2:
! Matlab Help. , help sin sin.
m-
, , m- MATLAB ( m). script-m- ( ) , MATLAB, . MATLAB. MATLAB File/New/M-file ( , ). script- , script- ( ). , , , MATLAB, , , , , script-.
|
|
. MATLAB. File/Set Path . Path/Add to path.
:
1. m- New M-File ( m-).
2.
function z=expxp(x)
function , expxp, . Z x.
3. ( ).
z=exp(x)/x
4. . Save ().
5. m-.
z=exp(x)/x .
: z=expxp(1). z = 2.7183.