HP Forums

Full Version: Object behaviour in CAS programming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I just want to program an easy way to calculate de characteristic polynomial of a map.

In CAS mode I do the first steps very easily, I will put an example:
[[1 2],[3 7]]:=a // Asign the matrix to a variable "a"

Then I check that another variable does not exist, like for example "t"
Then I create an identity matrix of the same dimension as a and multiply by this variable:

This product is done without problems because in CAS mode "t" is considered TYPE 8.

But if I write a progrma doing this simple multiplication it does not work either for:
1.- If I delcare the variable as LOCAL then the value is 0 and the result obviously wrong.
2.- If I do not declre the program gives an error.

Does some body knows how to avoid this problem?

Thanks in advance for your help

Just a little bug is sombody is interested:
In Spreadsheet APP if you put in a column title: =coeff(expand(x+1)^row)
then the calculator gives some extrange symbols or just blocked

You have to do the operation in a CAS part of the program.
You can declare a CAS section in a program by using the #cas and #end section.

Thanks very much for your answer.

I heve put this and it Works:

return m;
Reference URL's