Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to write this integration in a workable way

1 回表示 (過去 30 日間)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2019 年 12 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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])

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by