Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. n = 1000; % Dimension of the problem
  2. nsamp = 1e6; % Number of samples
  3. ux = randn(n,nsamp); % Generating random numbers
  4. G = 1-sum(ux)/sqrt(n); % Performance function evaluations
  5. isuccess = zeros(1,nsamp);
  6. isuccess(G<0)=1; % Checking for sample that lie in failure region
  7. pf_mcs = sum(isuccess)/nsamp; % Estimate of the probability of failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement