Programmer palette and complex numbers

Programmer palette and complex numbers - Mensajes

#1 Publicado: 7/3/2011 7:19:02
marcin

marcin

0 me gusta en 2 mensajes.

Grupo: User

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/2121299493009
jpg version of test file: http://wrzucacz.pl/file/4761299493151
#2 Publicado: 7/3/2011 7:48:00
Radovan Omorjan

Radovan Omorjan

325 me gusta y 1 no me gusta en 2.052 mensajes.

Grupo: Moderator

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
[MATH=eng]Iamp(225)=1.06*10^{-2}[/MATH]
Symbolical result
[MATH=eng]Iamp(225)—abs({10*(500000+225000*i*π)*(1000+225*i*π)}/{sqrt(2)*(225000*i*π*(500000+225000*i*π)+500000000*(1000+225*i*π))})[/MATH]
Before for loop
[MATH=eng]i—i[/MATH]
[MATH=eng]for(i,range(1,n_fx),el(tab_Iamp,i)←Iamp(el(fx,i)))[/MATH]
After for loop
[MATH=eng]i—101[/MATH]
[MATH=eng]Iamp(225)=7.12*10^{-3}[/MATH]
[MATH=eng]Iamp(225)—abs({10*(500000+22725000*π)*(1000+22725*π)}/{sqrt(2)*(22725000*π*(500000+22725000*π)+500000000*(1000+22725*π))})[/MATH]

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • Nuevos mensajes
  • Sin mensajes nuevos