.


:




:

































 

 

 

 


MatLab




MatLab , , , , , , +, -, *, /, ^, . , , .

 

MatLab, . , , , . ,

E-7, 0.89e12.

, . , . MatLab i j, -1. ,

3i, 5j, -5.1 +i8, 005e-5- j0.006.

MatLab . , , MatLab . .

 

( ). (, 1, -5, 3.97) .

 

(. 3.1-3) , . .

2.3.1-3 3.5.3-3

i j
pi π=3.1415926
eps ( 2-52)
realmin ( 2-1022)
realmax ( 21022)
inf
NaN (Not-a-Number)

 

, . :

' ' '88+0'

 

MatLab %. ,

%

, , , . , , . :

( ) , , ;

;

.

 

, =.

3.1-5
>> a=3.25*(0.7-3.3/5.1)+2.3^3 a = 12.3391 >> b=5*(2.2+3.9i)+0.8 b = 11.8000 +19.5000i >>

 

. 3.1-4.

3.1-4

-
plus + M1+M2
uplus + +M
minus - 1-M2
uminus - -
mtimes * M1*M2
times .* A1.*A2
mpower ^ ^
power .^ A.^x
mldivide ( ) \ M1\M2
mrdivide / M1/M2
ldivide .\ A1.\A2
rdivide ./ A1./A2

, . , * mtimes(Ml,M2). , .

3.1-6

>>=[1 2 3];

>>=[4 5 6];

>>-

ans=

      3 3  
  >>minus (. )      
  ans =      
      3 3  
  >>. ^ 2      
  ans =      
      4 9  
  >> power(A,2)      
  ans =      
      4 9  
  >>.\B      
  ans=      
    4.0000 2.5000 2.0000  
  >>ldivide(A,B)      
  ans=      
    4.0000 2.5000 2.0000  
  >>rdivide(A,B)      
  ans=      
    0.2500 0.4000 0.5000  
                 

MatLab MatLab. , .

, . , MatLab , , , . .

 

MatLab . . 3.1-5. . , .

3.1-7
>>help elfun >>

 

3.1-5

( )
sin, cos, tan, cot , ,
sec, csc ,
- ( .)
asin, acos,atan,atan2, acot , ,
asec, acsc ,
sinh, cosh, tanh, coth . , ,
sech, csch
asinh, acosh, atanh, acoth , , ;
, ,
exp
log, log2, log10 , 2 10
sqrt
,
abs, sign
conj, imag, real -
mod, rem
gcd, lcm
cell, fix, floor, round

 

help . help, - , help .

. MatLab , , . , 1. , , Inf Inf. NaN (Not a Number ). MatLab .

, , . i, j:

 

3.1-8
>>x=1.5-0.5i x = 1.5000 - 0.5000i >>y=1.5-0.5j y = 1.5000 0.5000j >>

 

i j - , , :

3.1-9
>>a=1; >>x=i*a x = 0 + 1.0000i >>y=a*i y = 0 + 1.0000i >>

 

, , .

real imag , complex .

3.1-10
>>b=5+j10; >>c=real(d) c= >>d=imag(b) d= >>

 

conj() . , .

3.1-11
>>t=conj(b) t= 5.0000e+000 -1.0000e+001i >>g=b' g= 5.0000e+000 -1.0000e+001i >>

 

, MatLab , .

, MatLab . MatLab , .

 





:


: 2016-11-24; !; : 522 |


:

:

80% - .
==> ...

1534 - | 1386 -


© 2015-2024 lektsii.org - -

: 0.021 .