Post Reply 
How to obtain element-wise squaring of vector/matrix?
11-27-2019, 07:16 AM
Post: #4
RE: How to obtain element-wise squaring of vector/matrix?
(11-26-2019 08:47 PM)swagner53 Wrote:  Hi,

apply is a CAS command that does not work under Home. Try converting to a CAS program by sandwiching your code between #cas and #end. Hopefully, that will work.

Take care & good luck, Steve

I found this works:
Code:

#cas
DEMO2():=
BEGIN
  apply(x→x^2, [1, 2, 3, 4]);
END;
#end

Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to obtain element-wise squaring of vector/matrix? - mbeddo - 11-27-2019 07:16 AM



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