SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Programmer palette and complex numbers
Rank: Newbie
Groups: Registered
Joined: 07/03/2011(UTC) Posts: 2 Location: Szczecin
|
Precondition: - smath_0_89_8 portable - Wndows XP Test steps: 1. Create new SMath document 2. Create some procedures with complex numbers 3. Put “Programmer palette” with “for” loop (with no influence on formula from step 2) 4. Put over and under “Programmer palette” result of some complex numbers counting result Expected resul: the same values should be shown Result: Difference values are shown Remark: Also graph for which “Programmer palette” with “for” loop was used shown incorrect results. After removing “Programmer palette” counting was correct test file: http://wrzucacz.pl/file/2121299493009jpg version of test file: http://wrzucacz.pl/file/4761299493151
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello marcin,
Actually, there is an influence on your Iamp() function. You changed the variable "i" and used it as a loop variable. This way you've lost the imaginary unit. Advice: Do not use variable "i" as a loop variable if using complex numbers. Numerical result Iamp(225)=1.06*10^{-2} Symbolical result Iamp(225)—abs({10*(500000+225000*i*π)*(1000+225*i*π)}/{sqrt(2)*(225000*i*π*(500000+225000*i*π)+500000000*(1000+225*i*π))}) Before for loop i—i for(i,range(1,n_fx),el(tab_Iamp,i)←Iamp(el(fx,i))) After for loop i—101 Iamp(225)=7.12*10^{-3} Iamp(225)—abs({10*(500000+22725000*π)*(1000+22725*π)}/{sqrt(2)*(22725000*π*(500000+22725000*π)+500000000*(1000+22725*π))})
Regards, Radovan
|
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
Programmer palette and complex numbers
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.