?? em_kstest.m
字號:
function [H_KS, P, KSSTAT] = EM_KStest(obs_data, mix_names, mix_weights, mix_pars, rnd_state, fig_hnd)
fprintf(1,'\n\n Performing K-S test: \t');
N = length(obs_data);
sim_data = EM_Generate_sample(N, mix_names, mix_weights, mix_pars, rnd_state);
[H_KS,P,KSSTAT] = kstest2(sim_data(:,1),obs_data);
fprintf(1,' P = %f, KSSTAT = %f\n',P,KSSTAT);
figure(fig_hnd);
hold on
cdfplot(sim_data(:,1));
h = findobj(gca,'type','line');
set(h(1),'linestyle',':','color','r');
cdfplot(obs_data)
h = findobj(gca,'type','line');
set(h(1),'linestyle','-','color','b');
legend('Model','Data');
set(gca,'TickDir','out');
hold off
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -