How to solve unknown elements of a matrix in mle function?
3 次查看(过去 30 天)
显示 更早的评论
I have been trying to find the unknown value of a basis function by using mle estimation method. My basis function consists of basis(x,k) where x is the data and k is the unknown parameter with (5X1) dimension say[k(1), k(2),k(3),k(4),k(5)]. My liklihood function estimation is like:
function Z=bbasis(x,k)
k=[k(1), k(2),k(3),k(4),k(5)];
z=[];
for i=1:5
Z=[x-k(i)];
z=[z,Z];
end
end
x=rand(20,1);
y=rand(20,1);
F=ones(20,1);
f = @(x,w) (2*3.1416)^-(20)*(det(bbasis(x,w)*rand(10,10)*bbasis(x,w)'))^(-.5)*exp(-.5*(y-F)'*inv(bbasis(x,w)*rand(10,10)*bbasis(x,w)')*(y-F))
lk=mle(x,'pdf','f','start',[0 0 0 0 0 ])
*I am getting the following error:*
Error using mlecustom (line 93)
The 'pdf' parameter value must be a function handle or a cell array
containing a function handle.
Error in mle (line 237)
phat = mlecustom(data,varargin{:});
3 个评论
Viren Gupta
2018-10-4
have you updated the changes in the question above? If yes, then still there is dimension problem. bbasis1 returns 20*1 matrix and multiplying that with rand(10,10) is wrong. I suggest you to try giving some sample inputs to your pdf function and see if that works before working on mle first.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!