Problem: I have a function - let´s say
f(x,y):=x^2*y^3,
with Jacobian and Hessematrix;
Now I want to evaluate these objects at a certain point and then use the results for further calculations, e.g. the Hessian in (2,3).
hm(x,y):=hessian(f(x,y),[x,y]); gives the matrix as a function in x and y, - however,
mymatrix:=ev(hm(x,y),x=2,y=3);
leads to error:
define: argument cannot be an atom or a subscripted memoizing function; found: mymatrix -- an error. To debug this try: debugmode(true);
hessian(f(x,y),[x,y]); ev(%,x=2,y=3);
gives me the Hessian at the point - however,
mymatrix:=%
leads to the same error as above.
(In fact I don´t need the matrix itself but the inverse & the Jacobian as well for gradient descents - but I think, once I´ve one of them I´ll manage the rest too ...)
Apologies if the question has already been posed - I did not succeed to find anything helpful - will be grateful for every response!
Christoph
:=
is for defining functions. :
is for assigning to a variable. I think you want mymatrix : <some expression>;