The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Comparing Matrices (in CAS Mode?)
11-02-2016, 03:48 AM
Post: #1
Comparing Matrices (in CAS Mode?)
I am trying create a matrix program in CAS mode, isorthogonal, to test whether a matrix is orthogonal:

#cas
isorthogonal(m):=
BEGIN
LOCAL s,n,p;
s:=SIZE(m);
s:=s(1);
n:=IDENMAT(s);
p:=simplify(TRN(m)*m));
IF n==p THEN
RETURN 1;
ELSE
RETURN 0;
END;
END;
#end

Testing [[2,0][0,2]] and [[2*x,0][0,2*x]] I get the error

"For: Unable to check test Error: Bad Argument Value"

Are we not able to compare matrices in CAS mode? Thanks,

Eddie
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Comparing Matrices (in CAS Mode?) - Eddie W. Shore - 11-02-2016 03:48 AM



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