フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Using indicators to represent variables in a distribution (Indicator Transform)

2 ビュー (過去 30 日間)
Gumps
Gumps 2018 年 11 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I would like some help on how I can use indicators such as i1 - i6 to represent different ranges of variables in a distribution. The reason for this is my variables are continous and my hope is to use the indicator transform to make it categorical before I can then go on with my other coding (perturbation of the probabilities). For the indicator, I(u) = K if Z(u)<=zk for all K=0.0001,....,k K+1 if Z(u)>zk currently I have this code and will be happy for anyone to help me out; mu = 300.45; sigma = 120.5; N2 = 100; Tpf = randn(N2,1)*sigma + mu; Tpfmin= -10; %upper bound Tpfmax = 650;%lower bound h2 = 60; % bin width edges = Tpfmin:h2:Tpfmax;
% Plot histogram and distribution hist = histc(Tpf,edges); figure; bar(edges,hist,'histc'); grid on grid minor
% Overlay the distribution hold; f = @(z) N2*h2*normpdf(z,mu,sigma); fplot(f,[Tpfmin Tpfmax]);
% Put up legend. legend2 = sprintf('Tpf mean = %.3f', mean(mu)); legend(legend2);

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by