Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to write this integration in a workable way

2 visualizaciones (últimos 30 días)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD el 16 de Dic. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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])

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by