numbered_symbols in xcas

Messages in english

Modérateur : xcasadmin

george
Messages : 1
Inscription : lun. mai 18, 2015 1:40 pm

numbered_symbols in xcas

Message par george » lun. mai 18, 2015 2:05 pm

Hi, need help immediatly. Anyone knows how to create a list o f numbered symbols in order to be used as unidentified coefficients on a polynomial.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: numbered_symbols in xcas

Message par frederic han » lun. mai 18, 2015 2:35 pm

Hello,

you have different ways.
1) just use a free name with the array syntax:

Code : Tout sélectionner

P:=sum(a[j]*x^j,j=0..10);
you can do the same for a matrix:

Code : Tout sélectionner

B:=matrix(5,5,(u,v)->a[u,v]);
det_minor(B);
or
2) convert a string to a symbol via the # function:

Code : Tout sélectionner

Q:=sum(#("a"+j)*x^j,j=0..5)

Répondre