Page 1 sur 1

numbered_symbols in xcas

Publié : lun. mai 18, 2015 2:05 pm
par george
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.

Re: numbered_symbols in xcas

Publié : lun. mai 18, 2015 2:35 pm
par frederic han
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)