π
<-

partial fractions

Pour le TI-Basic sur Nspire

partial fractions

Unread postby jmat » 04 Dec 2014, 15:51

hello, how could I put this function in a program to access from the library.
and modify the code to work me with complex roots

thank you
Code: Select all
Define LibPub f1_4_met_gen(expr1,var)=
Func
:Local mat1,mat2
:mat1:=f1_3_met_gen(expr1,var)
:Local ii,tam
:tam:=dim(mat1)[1]
:mat2:=0
:If mat1[1,1]="*" Then
:  For ii,1,tam
:    If mat1[ii,1]="*" Then
:      If string(mat2)="0" Then
:        mat2:={part(mat1,ii)}
:      ElseIf string(mat2)≠"0" Then
:        mat2:=a_r_m(mat2,{part(mat1,ii)})
:      EndIf
:    EndIf
:  EndFor
:  tam:=dim(mat2)[1]
:  mat1:=0
:  For ii,1,tam
:    If buscar_var(mat2[ii,2],var)>0 Then
:      If string(mat1)="0" Then
:        mat1:={part(mat2,ii)}
:      ElseIf string(mat1)≠"0" Then
:        mat1:=a_r_m(mat1,{part(mat2,ii)})
:      EndIf
:    EndIf
:  EndFor
:  tam:=dim(mat1)[1]
:  mat2:=0
:  For ii,1,tam
:    If buscar_var(mat1[ii,2],var)>0 Then
:      If string(mat2)="0" Then
:        mat2:={part(mat1,ii)}
:      ElseIf string(mat2)≠"0" Then
:        mat2:=a_r_m(mat2,{part(mat1,ii)})
:      EndIf
:    EndIf
:  EndFor
:  tam:=dim(mat2)[1]
:  Local list1
:  list1:={mat2[tam,2]}
:  For ii,1,tam
:    list1[ii+1]:=mat2[ii,3]
:  EndFor
:  Return list1
:Else
:  Return {expr1}
:EndIf
:EndFunc

User avatar
jmat
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 12.5%
 
Posts: 50
Joined: 24 Jul 2013, 01:03
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby Bisam » 04 Dec 2014, 15:56

To access this from the library, just save the file containing this program in "Mylib" and then "Refresh the libraries" by pressing :nssc: :nsdo: :ns6:.
Don't forget to make "Libpub" programs or functions (as you did here) since they will be the ones listed in the catalog, the others being omitted.
You will find your programs by pressing :nsbi: :ns5: and then choosing your file and your program inside it.
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby jmat » 04 Dec 2014, 23:04

as it could do to make me the first variable appears in the library
User avatar
jmat
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 12.5%
 
Posts: 50
Joined: 24 Jul 2013, 01:03
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby Bisam » 06 Dec 2014, 10:30

Please, don't use automatic translation : it is quite impossible to understand.
It would be easier for us to translate directly from spanish, if you can't speak french nor english !

Por favor , no use traducción automática : es casi imposible de entender.
Traducir directamente del español sería más fácil para nosotros si usted no puede hablar Francés ni Inglés !
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby jmat » 06 Dec 2014, 22:26

ok, como puedo dejar en la librería solo la variable de acceso a la función y no todas las que me aparecen?
User avatar
jmat
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 12.5%
 
Posts: 50
Joined: 24 Jul 2013, 01:03
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby Adriweb » 06 Dec 2014, 22:43

Using LibPriv, on things you don't want to be shown, might help since it will make stuff hidden from the catalog.

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: partial fractions

Unread postby jmat » 07 Dec 2014, 19:54

gracias compañero, he intentado esto que me dices pero me da error, también estoy intentando de que me trabaje con números complejos, me podes ayudar... aunque tenga que empezar desde cero
gracias
User avatar
jmat
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 12.5%
 
Posts: 50
Joined: 24 Jul 2013, 01:03
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby Bisam » 09 Dec 2014, 14:15

What does your program do ?
If it gives the "decomposition into simple elements" for a rational function... the calculator already does that !!

For complex numbers, you don't need a program either !
Just use the "i" that can be found in the :nspi: menu and NOT the one from the keyboard.
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby jmat » 10 Dec 2014, 23:03

gracias por tu respuesta, me refiero a cuando las raíces son complejas como => 3x/(x^2+1)
User avatar
jmat
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 12.5%
 
Posts: 50
Joined: 24 Jul 2013, 01:03
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: partial fractions

Unread postby Bisam » 11 Dec 2014, 14:41

The calculator doesn't expand partial fractions with complex roots.
You will have to make a program for that.

Displaying the results will not be easy as the calculator will automatically "simplify" the denominators to make them real.
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

Next

Return to Nspire-Basic

Who is online

Users browsing this forum: ClaudeBot [spider] and 1 guest

-
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.
809 utilisateurs:
>764 invités
>35 membres
>10 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)