Post Reply 
Programming help: MAKEMAT in CAS
12-20-2013, 06:55 PM
Post: #1
Programming help: MAKEMAT in CAS
What am I doing wrong here?

In a program, I have:

Quote:LOCAL flist = {'2*x+y', 'y', 'x^2'};
LOCAL vlist = {'x', 'y'};
CAS(EXPR("jac:=MAKEMAT(0," + SIZE(flist) + "," + SIZE(vlist) + ")"));
MSGBOX(CAS.jac);

The message box says "jac". I'm expecting a matrix.

I've tried so many different permutations of this recipe. I just can't understand how to perform this simple task.
Find all posts by this user
Quote this message in a reply
12-20-2013, 07:16 PM
Post: #2
RE: Programming help: MAKEMAT in CAS
Well, for starters CAS won't recognize LOCAL variable assignments. Also, you need to enclose the entire expression in double quotes " ", i.e. CAS(" <expr> ")
Find all posts by this user
Quote this message in a reply
12-20-2013, 07:30 PM
Post: #3
RE: Programming help: MAKEMAT in CAS
See the bottom of the thread linked below:

http://www.hpmuseum.org/forum/thread-132.html

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
12-20-2013, 08:04 PM
Post: #4
RE: Programming help: MAKEMAT in CAS
(12-20-2013 07:30 PM)Han Wrote:  See the bottom of the thread linked below:

http://www.hpmuseum.org/forum/thread-132.html

Thanks. Your post basically confirms what I've come to realise over the past week: the programming language is seriously broken, ugly and unintuitive when it comes to any kind of symbolic manipulation.

I've decided to give up programming the Prime for now as it's too much work for the simple things I'm trying to achieve.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: