.


:




:

































 

 

 

 


-




 

, , , M-. - , .

- MatrixOper:

function [A,B]=MatrixOper(X1,X2,x)

A=X1.*X2*x;

B=X2.*X2+x;

- X1 X2 ( -

. 2.36.1. .

. 2.36.2. t=0.

X1 X2 ), x. , A. B , ( ).

, X1 X2 , - MatrixOper . , - MatrixOper :

function [A,B]=MatrixOper(X1,X2,x)

n1=ndims(X1);

n2=ndims(X2);

% X1 X2

if n1==n2

error(' X1 X2 ')

else

for i=1:n1

if(size(X1,i)~=size(X2,i)

error(' ')

end

end

end

%

A=X1.*X2*x;

A=X2.*X2+x;

- MatrixOper error ( error). MatrixOper .

- MatrixOper (, MATLAB 11), .. - MatrixOper :

[m,n]=size(x)

if(m~=1|n~=1)

error(' ')

end

, . MATLAB nargin, , - . :

if nargin~=3

error(' ')

end

MATLAB nargout, -. , ,

[s1,s2,s3]=MatrixOper(X1,X2,x)

, - , - . - MatrixOper - nargout:

if nargout~=2

error(' ')

end

- MatrixOper - . , MATLAB, (, , ). , , , . , , plot, .

, - , , , , - . . , , - Test_Function:

function [res1,res2]=Test_Function(var1,var2)

switch nargin

case 1

if nargout==1

res1=var1*2;

elseif nargout==2

res1=var1*2;

res2=var1+3;

else error(' 1 2 ')

end

case 2

if nargout==1

res2=var1.*var2;

elseif nargout==2

res1=var1.*var2;

res2=var1+3;

else error(' 1 2 ')

end

otherwise error(' 1 2 ')

end

- .

, , . , .

, -. - , , , , , - MATLAB. , . , - , , , , -.

 

 





:


: 2016-12-06; !; : 790 |


:

:

80% - .
==> ...

1389 - | 1239 -


© 2015-2024 lektsii.org - -

: 0.012 .