Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How to write this integration in a workable way

2 views (last 30 days)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD on 16 Dec 2019
Closed: MATLAB Answer Bot on 20 Aug 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])

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!