Post Reply 
Complex matrices in programs
12-14-2014, 10:36 PM (This post was last modified: 12-14-2014 10:36 PM by Han.)
Post: #4
RE: Complex matrices in programs
(12-14-2014 10:19 PM)Helge Gabert Wrote:  By the way, did you try to define a complex matrix within a CAS program?

I get "Unmatch control word" error message.

Actually, I just discovered that I can't run any CAS programs any more, even the default template "new CAS program" without any alteration returns

program([],[],[0 0]).

Resetting the calc also doesn't help. Is this occurring because of the "insufficient memory message"?

I can confirm the behavior with complex matrices in a non-CAS program. For CAS programs, I tried:

Code:
#cas
TEST():=
BEGIN
local l:=[[(1,2)],[(3,4)],[(5,6)]];
return l;
END;
#end

This program ran fine in Home and CAS view (Firmware 6940).

Regarding complex matrices -- the parser actually converts any matrix into a list combined with a ListToMat() command. However, it seems to choke on complex matrices. You can see this by creating the following program that does nothing but declare and initialize two variables: a real value and a matrix and then debug it.

Code:
EXPORT TEST2()
BEGIN
local a:=0;
local l:=[[1,COS(a)],[4,5]];
END;

This only occurs for matrices that do not consist of purely real numbers (in this case "COS(a)" not a real number in syntax).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Complex matrices in programs - Snorre - 12-14-2014, 12:46 PM
RE: Complex matrices in programs - Han - 12-14-2014 10:36 PM
RE: Complex matrices in programs - Han - 12-14-2014, 11:56 PM
RE: Complex matrices in programs - Han - 12-15-2014, 12:59 AM
RE: Complex matrices in programs - Han - 12-15-2014, 02:02 AM
RE: Complex matrices in programs - Han - 12-15-2014, 03:55 AM
RE: Complex matrices in programs - Han - 12-15-2014, 04:20 AM



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