Jump to content



Photo
- - - - -

Conversion


  • Please log in to reply
2 replies to this topic

#1 Thanos_of_MW

Thanos_of_MW

    Newbie

  • Members
  • Pip
  • 6 posts

  • Calculators:
    fx-cg10
    fx-3600P

Posted 31 December 2011 - 02:57 AM

Hello,

I've been doing some Basic coding on the Prizm, successfully porting some programs from TI calcs and writing some of my own. I'm trying to find out some way to work around some instructions, so I have questions for the gurus:

-Any ideas on how to go about programming the "angle" instruction from TI on an equivalent for the Prizm? Example: Y=cos angle(0,2*pi*F*L)
-Any way to get a complex number in a variable? In TI calcs you can have "A=(R1,2*pi*F*L)"
-Any other suggestions on how to work with complex number notation in a program?

Also, which is the fastest way to plot dots in a Prizm? I noticed the "IF-then" instructions are very slow, as well as the loops, or is this a limitation of the built in BASIC?

Thanks

Edited by Thanos_of_MW, 31 December 2011 - 05:48 PM.


#2 amin_heidari

amin_heidari

    Casio Addict

  • Members
  • PipPipPip
  • 73 posts
  • Gender:Male
  • Location:Persia
  • Interests:Computer
    Programing
    Electrical Engineering

  • Calculators:
    CASIO FX-9860G SD hacked to G|| OS Version 2.01

Posted 31 December 2011 - 12:46 PM

-Any ideas on how to go about programming the "angle" instruction from TI on an equivalent for the Prizm? Example: Y=cos angle(0,2*pi*F*L)

you can use Arg function instead

-Any way to get a complex number in a variable? In TI calcs you can have "A=(R1,2*pi*F*L)"

it's easy for example 1+2i->A

Any other suggestions on how to work with complex number notation in a program?

some function for work with complex number
Rep extract real part
Imp extract imaginary part
Abs compute absolute value(r=(x^2+y^2)^0.5)
Arg compute angle(theta=tan^-1(y/x)) result is always between pi & -pi
Conj compute conjugate of complex number( 2+i->A Conj A=2-i)

Also, which is the fastest way to plot dots in a Prizm? I noticed the "IF-then" instructions are very slow, as well as the loops, or is this a limitation of the builot in BASIC?

what??? you do'nt need use If Then.
you can use:
Plot x,y display pointer at the location specified by the coordinates and plot a point there
Line connect two plotted points with a line
& so on

Edited by amin_heidari, 31 December 2011 - 01:07 PM.


#3 Thanos_of_MW

Thanos_of_MW

    Newbie

  • Members
  • Pip
  • 6 posts

  • Calculators:
    fx-cg10
    fx-3600P

Posted 31 December 2011 - 05:09 PM

you can use Arg function instead


it's easy for example 1+2i->A


some function for work with complex number
Rep extract real part
Imp extract imaginary part
Abs compute absolute value(r=(x^2+y^2)^0.5)
Arg compute angle(theta=tan^-1(y/x)) result is always between pi & -pi
Conj compute conjugate of complex number( 2+i->A Conj A=2-i)


what??? you do'nt need use If Then.
you can use:
Plot x,y display pointer at the location specified by the coordinates and plot a point there
Line connect two plotted points with a line
& so on


Thank you for all the input! I'm off to test these in my code. Have a Happy New Year!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users