isa probability distribution?

2 ビュー (過去 30 日間)
Jeff Miller
Jeff Miller 2017 年 11 月 1 日
回答済み: Eric 2017 年 11 月 1 日
How can I check whether variables are probability distributions made by makedist? For example:
x(1) = makedist('Gamma');
x(2) = makedist('Normal');
x(3) = makedist('Exponential');
I want a function like
isa(x(i),'probdist')
that returns true for all three x's. As I understand it, isa would work if these distributions all had a common parent, e.g. called 'probdist', but I can't find any such common parent.
Thanks for any suggestions...

採用された回答

Eric
Eric 2017 年 11 月 1 日
By using
>> whos
I was able to determine that x's class is a "prob.ToolboxFittableParametricDistribution" object, such that
for i=1:3
isa(x(i),'prob.ToolboxFittableParametricDistribution')
end
returns true for all three x's.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by