matrix.sqrt | R Documentation |
Computes the square root of the matrix A
, where A
does not have to be a square matrix,
when the square root exists.
See https://people.orie.cornell.edu/davidr/SDAFE2/Rscripts/SDAFE2.R
matrix.sqrt(A)
A |
A matrix, not necessarily square |
Returns the square root of A
, if exists, otherwise gives an error message.
Elvan Ceyhan
A<-matrix(sample(20:40,4),ncol=2)
matrix.sqrt(A)
A<-matrix(sample(20:40,16),ncol=4)
matrix.sqrt(A)
#sqrt of inverse of A, or sqrt inverse of A
matrix.sqrt(solve(A))
#non-square matrix
A<-matrix(sample(20:40,20),ncol=4)
matrix.sqrt(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.