Data Return Using @

Hello,
I am uing the example code at the bottom of the probplot.m help file:
probplot(data);
p = mle(data,'dist','tlo');
t = @(data,mu,sig,df)cdf('tlocationscale',data,mu,sig,df);
h = probplot(gca,t,p);
set(h,'color','r','linestyle','-')
title('{\bf Probability Plot}')
legend('Normal','Data','t','Location','NW')
The code uses the @ function to determine the fitted 'tlocationscale' parameters. How do I get the these parameters (mu,sig,df) returned and stored?
Thank you for your time,
Ashley

回答 (1 件)

Matt Tearle
Matt Tearle 2011 年 4 月 27 日

0 投票

t is not determining the parameters mu, sig, and df. They are arguments to the function defined by t; they are passed in (in the next line h = probplot...) as p.
That is, you already have mu, sig, and df: they are the elements of the vector p.

カテゴリ

ヘルプ センター および File ExchangeRandom Number Generation についてさらに検索

質問済み:

2011 年 4 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by