Post Reply 
How to obtain element-wise squaring of vector/matrix?
11-26-2019, 11:18 PM
Post: #3
RE: How to obtain element-wise squaring of vector/matrix?
Alternatively you could also use the "point" operator .^ for element wise power operator on a vector or matrix , e.g.:

Code:
[1, 2, 3, 4].^2

resulting in: [1, 4, 9, 16]
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? - goetz - 11-26-2019 11:18 PM



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