MATLAB Answers

mutah
0

help on this code error

Asked by mutah
on 7 Nov 2013
Latest activity Commented on by mutah
on 7 Nov 2013
Hi all
I have this code but it still has error
can any one solve it ?
clear mixture;
mixtrue.dist='Exponential';
mixtrue.K=2;
mixtrue.weight=[0.1 0.9];
mixtrue.par=[1 10];
data=simulate(mixtrue,100);
data.Strue=data.S;
data=rmfield(data,'S');
dataplot(data)
clear mix;
mix.dist='Exponential';
mix.K=2;
prior=priordefine(data,mix);
[data,mix,mcmc]=mcmcstart(data,mix);
mcmcout=mixturemcmc(data,mix,prior,mcmc);
mcmcplot(mcmcout,2);
[est,mcmcout]=mcmcestimate(mcmcout);
[marlik,mcmcout]=mcmcbf(data,mcmcout)
mcmcout.name= 'store_mix_exponential_K2';
mcmcstore(mcmcout);

  2 Comments

Walter Roberson
on 7 Nov 2013
What difficulty do you see when you try?
mutah
on 7 Nov 2013
when i execute this code i found error

Sign in to comment.

1 Answer

Answer by John Mahoney on 7 Nov 2013

Are you mixing up "mixture" and "mixtrue"?

  1 Comment

mutah
on 7 Nov 2013
yes .

Sign in to comment.