필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to write this integration in a workable way

조회 수: 2 (최근 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