Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = 1000; % Dimension of the problem
- nsamp = 1e6; % Number of samples
- ux = randn(n,nsamp); % Generating random numbers
- G = 1-sum(ux)/sqrt(n); % Performance function evaluations
- isuccess = zeros(1,nsamp);
- isuccess(G<0)=1; % Checking for sample that lie in failure region
- pf_mcs = sum(isuccess)/nsamp; % Estimate of the probability of failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement