Can someone check my code for a Monte Carlo and FORM analysis?

조회 수: 1 (최근 30일)
Aikaterini
Aikaterini 2014년 10월 8일
댓글: Bruno Pop-Stefanov 2014년 10월 9일
for Hb=0:1:7, for i = 1:length(samples.hth), Dhsetup=0.5*samples.rair(i)*samples.Cd(i)*samples.U10(i)^2*samples.F(i)/(samples.rsw(i)*samples.g(i)*samples.dbay(i)); % wind set-up Δhset-up n=48; j=(1:n); hbay(j)=1; for j=1:n, if hbay(j)>=Hb Dh(j)=samples.hcoast(i)-hbay(j); else Dh(j)=samples.hcoast(i)-Hb; end Cdf(j)=1-(hbay(j)/samples.hcoast(i))^1.5; Qw(j)=Cdf(j)*samples.Cw(i)*sqrt(samples.g(i))*samples.L(i)*Dh(j)^1.5; hbay(j)=hbay(j)+Qw(j)*samples.Dt(i)/samples.Abay(i)+Dhsetup; end hbay(i)=hbay(j); z(i,:) = samples.hth(i)-hbay(i); % limit state function end end
After runninng it there is an error "Error using FORM (line 219) FORM: derivative dz/du becomes complex for variable(s): "hcoast" Reconsider stochastic variable and z-function to solve the problem."
  댓글 수: 1
Bruno Pop-Stefanov
Bruno Pop-Stefanov 2014년 10월 9일
Can you please format the code so that it is readable?
What function is form? There is no function in MATLAB called form and I don't see it used anywhere in the code you pasted. Can you paste the line of code that throws the error?
I don't know what this form function is but the message seems to indicate that you should reconsider the variable hcoast because dz/du is complex. Maybe there is something wrong with your z-function or with hcoast?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by