Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to write this integration in a workable way

2 vues (au cours des 30 derniers jours)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD le 16 Déc 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
Dear All, I have this code to write the integration that is required to calculate the probability of failure of a structure along 360 hours, as can be seen the first variable x1 follows a normal distribution with mean (Mean) and standard deviation of (Sigma), then the failure index (Beta) is shown in the equation, how can I please write this integration in a way that works? it keeps giving me that: DOUBLE cannot convert the input expression into a double array.
x1 = xlsread('Question', 1, 'A2:A361');
y1 = xlsread('Question', 1, 'B2:B361');
z1 = xlsread('Question', 1, 'C2:C361');
syms x
for i = 1:360
Mean = x1(i);
Sigma = y1(i);
pdf = (1./sqrt(2.*3.14.*(Sigma.^2))).*exp(-1.*((x-Mean).^2)./(2.*Sigma.^2));
Y = z1(i) ;
beta = (25 - pdf)/sqrt(Y);
pf(i) = 100*int(normcdf(-1*beta).*pdf,-inf,Inf);
Failure = double(pf(i));
end
figure
plot(Failure)
xlim([0 360])
ylim([0 40])

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by