function [thetaHat,rul]=BM_Crack(para0,weigh) global DegraUnit initDisPar ... TimeUnit time y thres ParamName thetaTrue signiLevel ns ny np %=== PROBLEM DEFINITION 1 (Required Variables) ============== WorkName='Crack_BM'; % work results are saved by WorkName DegraUnit='Crack size (m)'; % degradation unit TimeUnit='Cycles'; % time unit (Cycles, Weeks, etc.) time=[0:100:3500]'; y=[0.0100 0.0109 0.0101 0.0107 0.0110 0.0123 0.0099 0.0113... 0.0132 0.0138 0.0148 0.0156 0.0155 0.0141 0.0169 0.0168]'; thres=0.05; ParamName=['m'; 'C'; 's']; initDisPar=[4.0 0.2; -23 1.1; 0.001 1e-5]; %[npx2]: prob. parameters of init./prior dist thetaTrue=[3.8; log(1.5e-10); 0.001]; signiLevel=5; % significance level for C.I. and P.I. ns=5e3; % number of particles/samples burnIn=0.2; % ratio for burn-in %============================================================ % % % PROGNOSIS using BM with MCMC ny=length(y); np=size(ParamName,1); sampl(:,1)=para0; %% Initial Samples [~,jPdf0]=MODEL(para0,time(1:ny)); %% Initial (joint) PDF for i=2:ns/(1-burnIn); %% MCMC Process % proposal distribution (uniform) para1(:,1)=unifrnd(para0-weigh,para0+weigh); % (joint) PDF at new samples [~,jPdf1]=MODEL(para1,time(1:ny)); % acception/rejection criterion if rand