Matrix-exponentiation operator: Difference between revisions
Content deleted Content added
ReeceGoding (talk | contribs) m →Infix operator: Improved syntax. |
ReeceGoding (talk | contribs) |
||
Line 2,889:
if(n==0) diag(nrow = nrow(mat))#Identity matrix of mat's dimensions
else if(n == 1) mat
else if(n > 1) mat %*% (mat %^% (n - 1))
else stop("Invalid n.")
}
|