Explicit formula for kstest p value

9 ビュー (過去 30 日間)
Christopher
Christopher 2023 年 3 月 27 日
編集済み: Christopher 2023 年 3 月 28 日
I want to use the KS test in an optimisation problem and I don't think the default logical output from kstest will do since it's only ever 0 or 1 – not good for an optimisation problem. What command do I use to only get the pvalue so I can use it in my objective function?
Thanks.
  4 件のコメント
Jeff Miller
Jeff Miller 2023 年 3 月 28 日
Unless you insist on an anonymous function as the objective, then I think your objective function can do anything you want, e.g.
function prod3 = myobjective(xin)
[~,p1] = kstest(___);
[~,p2] = kstest(___);
[~,p3] = kstest(___);
prod3 = p1*p2*p3;
% or whatever
end
Christopher
Christopher 2023 年 3 月 28 日
編集済み: Christopher 2023 年 3 月 28 日
That's great! Thank you very much for your help.

サインインしてコメントする。

回答 (0 件)

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by