Federico Calboli wrote:
Dear All,

I would like to ask why the zeroeth power of a matrix gives me a matrix
of ones rather than the identity matrix:


Because ^0 gives you the zero-th power of the _elements_ of the matrix, not the matrix itself. A matrix of 0^0 is all 1s.


Similary, '*' multiplies the elements together, it doesn't do matrix multiplication. For that you need %*%.

There is no %^% operator for matrix exponentials.

Baz

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to