You are on page 1of 11

:

Functions

:
-1-7
.1
.2
.3
.
.
.

. ( )

-

:
-1-7 --
.
.

.
:
.

:
-2-7
.1
.
.2

(.
)
.3

:
-3-7
function
:
= ] function [argout1 , argout2,
)funcname(argin1,argin2,
%
%
%

%

...
-

:
-3-7 --
:
.1
.2

.3

.
lookfor

help
.

:
help .

:
-4-7 return error

. error
return error
.

:
;) =s= input( Please enter a scalar value
if length (s) > 1
;)!error(Error! Your input isnt a scalar
end
;)a= linspace( 0 , abs(s) , 100

:
-5-7
.
size
.
nargin nargout
.
nargchk nargoutchk
.

:
-6-7
.

.
.
.

:
-- ( ) :


.
(
) .
.

y=2exp(4x2)+3sin(2x)+10
y x
(. : ) plot(x,y .

:
-1-7 (
) :

( )nargchk
(. )nargoutchk
( . isstr
isnumeric )
eval
.

You might also like