From: gozer on
Looking for help using the probplot(ax,fun,params) routine. After fitting a curve to my dataset using probplot(ax,fun,params) I would like to extract a specific x-value for a specific y input value from the curve. Any ideas on how to accomplish this?
From: gozer on
"gozer " <wolfeb(a)timken.com> wrote in message <hl1npo$o8a$1(a)fred.mathworks.com>...
> Looking for help using the probplot(ax,fun,params) routine. After fitting a curve to my dataset using probplot(ax,fun,params) I would like to extract a specific x-value for a specific y input value from the curve. Any ideas on how to accomplish this?

Further explanation: I guess what I am trying to do is return x-y values from the 'fun' being plotted.
The line looks like:
h_ = probplot(ax_,dist_.cdffunc,p_);

this structure array has sub arrays of function handles.
From: Tom Lane on
>> Looking for help using the probplot(ax,fun,params) routine. After
>> fitting a curve to my dataset using probplot(ax,fun,params) I would like
>> to extract a specific x-value for a specific y input value from the
>> curve. Any ideas on how to accomplish this?
>
> Further explanation: I guess what I am trying to do is return x-y values
> from the 'fun' being plotted.
> The line looks like:
> h_ = probplot(ax_,dist_.cdffunc,p_);
>
> this structure array has sub arrays of function handles.

It looks like you are using generated code from the "dfittool" function in
the Statistics Toolbox. I think the structure you mention has an inverse cdf
function handle you can call. But here's how to do it in general.

% This will create a prob plot with an extra fitted curve corresponding to a
% Weibull distribution
>> load census
>> pd = fitdist(pop,'weibull')
pd =
weibull distribution
a = 85.1462
b = 0.983611
>> probplot(pop)
>> probplot(gca,pd)

% I can call the inverse cdf method for the distribution object
>> icdf(pd,.75)
ans =
118.6819

% Or I can call the Weibull inverse cdf function and supply the paramters I
have
>> wblinv(.75,pd.Params(1),pd.Params(2))
ans =
118.6819

-- Tom