try to find hessian matrix
Show older comments
f(k) = n*ln(k)-n*ln(1/n*sum(i=1 to n)xi^k+(k-1)sum of (1to n)ln(xi))-n
3 Comments
KSSV
on 13 Jul 2023
What have you tried? You are facing any problem or error?
Taniya
on 13 Jul 2023
Dyuman Joshi
on 13 Jul 2023
The expression you have written above is not clear. Please format it properly.
Accepted Answer
More Answers (1)
The vector of independent variables is (x1,x2,...,xn):
syms i k
n = 3;
x = sym('x',[1 n])
f = n*log(k) - n*log(1/n*sum(x.^k) + (k-1)*sum(log(x))) - n
df = gradient(f,x)
d2f = hessian(f,x)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

