Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to calculate element-wise matrix functions in Sage

In MATLAB one can write:

A = [1,2,3]; B = 2*A.^3;

where B gets element-wise result of the function 2*A.^3 given matrix (or vector) A.

In Sage the notation .^ does not function. How to do this in Sage?

Then how to calculate the element-wise sin(A) in Sage?