Product of two real numbers gives (sometimes!) a complex number?
Ältere Kommentare anzeigen
Hello, I am running some tests. I have a vector called "Test" with the following values:
-8.886108641008270e+10 + 0.000000000000000e+00i
-8.885458690939740e+10 + 0.000000000000000e+00i
-8.735404059143396e+10 + 0.000000000000000e+00i
-8.622482848989987e+10 + 0.000000000000000e+00i
-8.567710315895950e+10 + 9.709734987051802e+09i
-8.567710315895950e+10 - 9.709734987051802e+09i
-8.561242064642362e+10 + 9.919436724860571e+09i
-8.561242064642362e+10 - 9.919436724860571e+09i
-7.721667671602890e+10 + 0.000000000000000e+00i
-6.735989534435745e+10 + 0.000000000000000e+00i
-1.130209647515076e+09 + 0.000000000000000e+00i
Now, if I do
K>> ans1=test(1)*test(2)*test(3)
ans1 =
-6.897226195528216e+32
K>> ans2=test(4)*test(5)*test(6)
ans2 =
-6.410682314585833e+32
If I do
K>> ans1*ans2
ans =
4.421592599137085e+65
But, if I do
K>> test(1)*test(2)*test(3)*test(4)*test(5)*test(6)
ans =
4.421592599137085e+65 - 5.846006549323612e+48i
I get a complex number. Can somebody explain me why it is happening what is happening?
Best,
Maria
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Hypothesis Tests finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!