How can I fit the parameters using mle with a self-defined function?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
jianyu WANG
el 30 de Mayo de 2023
Comentada: jianyu WANG
el 31 de Mayo de 2023
I 'm trying to fit the patameter of normal distribution using mle function I didn't use the built in function but with a self-defined function
Codes are as follows
clear;
clc;
f=@(x,mu,sigma) 1/sigma/sqrt(2*pi)*exp(-(x-mu).^2/2/sigma^2);
x=normrnd(0,1,[1000,1]);
pha=mle(x,'pdf',f,'Start',[0,1])
f is a function of the standard normal distribution I am using the mle function to fit the parameters but an error of "Numbers of input are not correct" happened I think a period of time but fail to find the soluition Can anyone help to solve this problem? Thanks
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Probability Distributions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!