[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apply function to vector
From: |
James Sherman Jr. |
Subject: |
Re: Apply function to vector |
Date: |
Mon, 20 Jun 2011 08:05:21 -0400 |
error: for A^b, A must be square
Mathematically, A^b means the power of the matrix, so for example, A^3 is A*A*A. For this operation, you do need A to be square for the matrix multiplication to make sense.
If you want to take the power of each element in the matrix, you need to put a period "." before the carat to indicate that you want the power of each element, A.^3 will take each element in A and cube them. This is the element-wise operations that you were reading about.
Hope this helps,