Solving Nonlinear Matrix Equation
이전 댓글 표시
I have an equation of the form
where A= positive definite symmetrix matrix (2 by 2), X is data matrix of dimensions (N by 2) and mu is a vector (1 by 2). Ki are scaler values and P is a constant. I want to use fsolve to solve for mu.
I am using the script as below
K_values in the code is an array that contains the values of each Ki.
data in the code is a ( N by 2 ) matrix of values that is passed on to the script below
The matrix A is calculated before running the script. The only unknown is the vector mu.
fsolve returns an error: Not enough input arguments
Any insight into solving this is highly appreciated.
syms X [length(data) 2]
syms mu [1 2]
syms K
T=subs(trace(inv(A)*(X-mu)'*(X-mu))^(P),X,data);
L1=subs(K*T,{K},{[K_values]});
fun1=matlabFunction(sum(L1));
mu0=[1;1];
options = optimoptions('fsolve','Display','none');
mu=fsolve(fun1,mu0,options);
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!