Why does this code not work?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
%USE MONTE CARLO METHOD TO CALCULATE PROBABILITY OF FAILURE OF WIND TURBINE
%The given limit state function for the given is
%g = P= 2.652*10^-8*D^2.4299*V3.0116- 0.5;
%Given :
D =90 ;
V = 6.672408424 ;
mean_D = 90 ;
mean_V = 6.6724 ;
sigma_D = 10.29023 ;
sigma_V = 0.67708 ;
%Now use normrnd function
n = 10e6;
D = normrnd(mean_D, sigma_D, [n,1]);
V = normrnd(mean_V, sigma_V, [n,1]);
%Create for loop
K = nnz(2.652*10^-8*D^2.4299*V^3.0116-0.5 < 100);
P_fail = K/n
0 Commenti
Risposte (1)
VBBV
il 21 Nov 2022
D =90 ;
V = 6.672408424 ;
mean_D = 90 ;
mean_V = 6.6724 ;
sigma_D = 10.29023 ;
sigma_V = 0.67708 ;
%Now use normrnd function
n = 10e6;
D = normrnd(mean_D, sigma_D, [n,1])
V = normrnd(mean_V, sigma_V, [n,1])
%Create for loop
K = nnz(2.652*10^-8*D.^2.4299.*V.^3.0116-0.5 < 100);
P_fail = K/n
3 Commenti
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!