π
<-

[SOLVED]Function algébric-->trigonometic

Pour le TI-Basic sur Nspire

[SOLVED]Function algébric-->trigonometic

Unread postby AlexisVieira » 19 Jun 2013, 00:45

Hi, every time i want to pass a number complexe writted in algebric mode (a+bi) to trigonometric mode (p*cis(x)) i need to use the abs() and angle() function, so this afternoon i tried to make a function/program that do this 2 steps in one
something like:
Code: Select all
Define .... trigo(x)
...
Return abs(x) *cis(angle(x))
End...

note that on my nspire i always have "cis" defined (define cis(x)=cos(x)+i*sin(x)) so the program should work even when i have the cis() defined...

if someone can help me with this...
btw, i want this to a ti-84 too...
Last edited by AlexisVieira on 23 Jun 2013, 18:29, edited 1 time in total.
I'm Portuguese, sorry about bad English :s
User avatar
AlexisVieira
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 25.7%
 
Posts: 213
Images: 13
Joined: 05 Feb 2013, 16:58
Location: Portugal
Gender: Male
Calculator(s):
MyCalcs profile
Class: 12ºAno PT

Re: Function algébric-->trigonometic

Unread postby Levak » 19 Jun 2013, 00:51

AlexisVieira wrote:if someone can help me with this...

I cannot see any question ?
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Function algébric-->trigonometic

Unread postby AlexisVieira » 19 Jun 2013, 00:51

Levak wrote:
AlexisVieira wrote:if someone can help me with this...

I cannot see any question ?


that function doesn't work... i need someone to fix it...
I'm Portuguese, sorry about bad English :s
User avatar
AlexisVieira
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 25.7%
 
Posts: 213
Images: 13
Joined: 05 Feb 2013, 16:58
Location: Portugal
Gender: Male
Calculator(s):
MyCalcs profile
Class: 12ºAno PT

Re: Function algébric-->trigonometic

Unread postby Levak » 19 Jun 2013, 00:57

AlexisVieira wrote:that function doesn't work... i need someone to fix it...

By defined everywhere, do you mean defined in MyLib ?
Are you sure the rest of the code is not usefull ?
What is the error ?
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Function algébric-->trigonometic

Unread postby AlexisVieira » 19 Jun 2013, 01:01

Levak wrote:
AlexisVieira wrote:that function doesn't work... i need someone to fix it...

By defined everywhere, do you mean defined in MyLib ?
Are you sure the rest of the code is not usefull ?
What is the error ?


i want a libpub function that when i tipe file/function(2i) the nspire answer me "2cis(pi/2)"
the "..." is that "prgrm" or "function", that (bad) exemple only have that one line of code...
I'm Portuguese, sorry about bad English :s
User avatar
AlexisVieira
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 25.7%
 
Posts: 213
Images: 13
Joined: 05 Feb 2013, 16:58
Location: Portugal
Gender: Male
Calculator(s):
MyCalcs profile
Class: 12ºAno PT

Re: Function algébric-->trigonometic

Unread postby Adriweb » 19 Jun 2013, 01:03

I believe that on TI's CAS, you can't make it so that that a calculation will return an expression in terms of a user-defined one.

It'd be great, though.

(At least not in non-native ways.)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 78.9%
 
Posts: 14744
Images: 1119
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: Function algébric-->trigonometic

Unread postby Levak » 19 Jun 2013, 01:06

AlexisVieira wrote:i want a libpub function that when i tipe file/function(2i) the nspire answer me "2cis(pi/2)"
the "..." is that "prgrm" or "function", that (bad) exemple only have that one line of code...

Oh, I see, but no you can't.
The CAS engine stops on primitives, and functions are not primitive, only stuff like cos(), sin(), exp() etc ... are.
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Function algébric-->trigonometic

Unread postby AlexisVieira » 19 Jun 2013, 01:08

Adriweb wrote:I believe that on TI's CAS, you can't make it so that that a calculation will return an expression in terms of a user-defined one.

It'd be great, though.

(At least not in non-native ways.)


well, i think that it's possible on the CAS oS... i was trying lots of times today and it returned me something aproximated of that that i want...
on the non-CAS it will be more complicated because it will return the angle in RAD, so the solution could be something like "angle(x)/pi" and a "pi" writte after...
I'm Portuguese, sorry about bad English :s
User avatar
AlexisVieira
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 25.7%
 
Posts: 213
Images: 13
Joined: 05 Feb 2013, 16:58
Location: Portugal
Gender: Male
Calculator(s):
MyCalcs profile
Class: 12ºAno PT

Re: Function algébric-->trigonometic

Unread postby AlexisVieira » 19 Jun 2013, 01:10

Levak wrote:
AlexisVieira wrote:i want a libpub function that when i tipe file/function(2i) the nspire answer me "2cis(pi/2)"
the "..." is that "prgrm" or "function", that (bad) exemple only have that one line of code...

Oh, I see, but no you can't.
The CAS engine stops on primitives, and functions are not primitive, only stuff like cos(), sin(), exp() etc ... are.


and you can do that for a non-CAS nspire?

on the cas maybe i can make it displays the angle and the module on diferent lines...
I'm Portuguese, sorry about bad English :s
User avatar
AlexisVieira
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 25.7%
 
Posts: 213
Images: 13
Joined: 05 Feb 2013, 16:58
Location: Portugal
Gender: Male
Calculator(s):
MyCalcs profile
Class: 12ºAno PT

Re: Function algébric-->trigonometic

Unread postby Levak » 19 Jun 2013, 01:12

AlexisVieira wrote:on the cas maybe i can make it displays the angle and the module on diferent lines...

Like returning lists/matrices ?
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Next

Return to Nspire-Basic

Who is online

Users browsing this forum: ClaudeBot [spider] and 2 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
897 utilisateurs:
>815 invités
>75 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)