Professional Documents
Culture Documents
Functions
:
-7-1
.1
.2
.3
.
.
.
.
) (
:
-7-1 --
.
.
.
:
.
:
-7-2
.1
.
.2
).
(
.3
:
-7-3
function :
function [argout1 , argout2, ] = funcname(argin1,argin2,
)
%
%
%
%
...
:
-7-3 --
:
.1
.2
.3
.
lookfor
help .
:
help
.
:
-7-4 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
:
-7-5
. size
.
nargin
nargout
.
nargchk nargoutchk
.
:
-7-6
.
.
.
.
:
-- ) (
:
.
) ( .
.
y=2exp(4x2)+3sin(2x)+10
yx).:)plot(x,y
.
:
-1-7
) (
:
)
(nargchk
).
(nargoutchk
) . isstr isnumeric (
eval
.