[Maxima] About types of variables
robert.dodier at gmail.com
Thu Dec 3 18:40:44 CST 2009
2009/12/3 Κωνσταντίνος Κωστας <kotzeve at hotmail.com>:
> I have s:"GAN";
> And i want to compare s(1) with C..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
> and i want to make a function like cint.I want to take a string and compare
> it with A[i] and if are equal i want to put the number from A[i] in an
> other new matrix.
OK, I don't understand what your goal is here, so I won't worry
whether there is a better general approach.
To make it work as you have set up the problem,
just put elements in the matrix which are strings like this:
"A", "B", "C", ....
More information about the Maxima