Post Reply 
Object behaviour in CAS programming
06-12-2016, 01:13 PM
Post: #1
Object behaviour in CAS programming
Hello

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:
IDENMAT(ColDim(a))*t:=tId

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
Find all posts by this user
Quote this message in a reply
06-13-2016, 04:59 AM
Post: #2
RE: Object behaviour in CAS programming
Hello,

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.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
06-14-2016, 08:48 PM
Post: #3
RE: Object behaviour in CAS programming
Thanks very much for your answer.

I heve put this and it Works:
#cas
Su_Prop(m.l);=
BEGIN
LOCAL m1;

m-(l*IDENMAT(COLdIM(M))):=m;
return m;
END;
#end
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)