[Maxima] About types of variables

Volker van Nek volkervannek at googlemail.com
Fri Dec 4 03:28:34 CST 2009

Maybe it helps, if you use stringdisp:true (default is
stringdisp=false). In that case the output shows which is a string and
which is a symbol.

(%i1) stringdisp:true$
(%i2) s:"GAN"$
(%i3) x:charlist(s);
(%o3)                           ["G", "A", "N"]
(%i4) C:matrix([A,B,C,F],[1,2,3,4]);
                                [ A  B  C  F ]
(%o4)                           [            ]
                                [ 1  2  3  4 ]

Volker van Nek

Am Donnerstag, den 03.12.2009, 23:27 +0000 schrieb Κωνσταντίνος Κωστας:
> Sorry again but i am confused.Is there any function giving the type of
> a variable???
> I have s:"GAN";
>          x:charlist(s);
>          C:matrix([A,B,C,F],[1,2,3,4]);
> And i want to compare s(1) with C[1][1]..What i have to do??After
> trying a lot of things i understood that they are different types and
> i can't compare them.I find one lazy solution by putting the word gun
> like this -> x:[G,U,N] but it isn't useful...My problem is that i have
> made a matrix 
> A:matrix([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_],
> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,0]);
> and i want  to make a function like cint.I want to take a string and
> compare it with A[1][i] and if are equal i want to put the number from
> A[2][i] in an other new matrix.
> I made this by using the ascii code(by abstracting 65) but i want to
> make it with a matrix in which i choose the numbers for the letters...
> Thanks for your time...I think that is sth easy but now i am confused
> and i need some help...Thanks again!
> ______________________________________________________________________
> Windows Live Hotmail: Your friends can get your Facebook updates,
> right from HotmailR.
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

More information about the Maxima mailing list