📄 s2rout2.m
字号:
% Routine 2.2 N = 10000; % set the number of trialsm = 0; % initialize mean failure timem2 = 0; % initialize the second momentfor i = 1:N % begin trials x = 11 + randn; % fail time for component \# 1 y = 12 + 2*randn; % fail time for component \# 2 z = 13 + 3*randn; % fail time for component \# 3w = min([x,y,z]); % min fail time of \# 1, \$ 2, and \# 3 m = m + w/N; % add this trial to mean fail time m2 = m2 + w*w/N; % add this trial to second moment end; % end of each trialm % display the MTBF sd = sqrt(m2 - m*m) % compute the standard deviation
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -