Dear all,

I have a matrix like this, M<- array(runif(100,-1,1), dim=c(10,10));

I want to get the gradient of M in a new 10 by 10 matrix say Mgrad.

Seemingly, the command like numericDeriv(expr, theta, rho =
parent.frame(), dir = 1) does not work in such a case since I can not
give an "expr".


Thank,

Best,
Bai

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to