Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
59
Task/Arithmetic-Complex/MATLAB/arithmetic-complex.m
Normal file
59
Task/Arithmetic-Complex/MATLAB/arithmetic-complex.m
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
>> a = 1+i
|
||||
|
||||
a =
|
||||
|
||||
1.000000000000000 + 1.000000000000000i
|
||||
|
||||
>> b = 3+7i
|
||||
|
||||
b =
|
||||
|
||||
3.000000000000000 + 7.000000000000000i
|
||||
|
||||
>> a+b
|
||||
|
||||
ans =
|
||||
|
||||
4.000000000000000 + 8.000000000000000i
|
||||
|
||||
>> a-b
|
||||
|
||||
ans =
|
||||
|
||||
-2.000000000000000 - 6.000000000000000i
|
||||
|
||||
>> a*b
|
||||
|
||||
ans =
|
||||
|
||||
-4.000000000000000 +10.000000000000000i
|
||||
|
||||
>> a/b
|
||||
|
||||
ans =
|
||||
|
||||
0.172413793103448 - 0.068965517241379i
|
||||
|
||||
>> -a
|
||||
|
||||
ans =
|
||||
|
||||
-1.000000000000000 - 1.000000000000000i
|
||||
|
||||
>> a'
|
||||
|
||||
ans =
|
||||
|
||||
1.000000000000000 - 1.000000000000000i
|
||||
|
||||
>> a^b
|
||||
|
||||
ans =
|
||||
|
||||
0.000808197112874 - 0.011556516327187i
|
||||
|
||||
>> norm(a)
|
||||
|
||||
ans =
|
||||
|
||||
1.414213562373095
|
||||
Loading…
Add table
Add a link
Reference in a new issue