I am trying to compute v' * f(A) * v, where f is a given function, A matrix, and v is a unite vector.
My code takes along time doing run and did not get the result. Could please help me to fix this problem?
f(x) = atan(sqrt(x));
B = funm(A,f);