How can I run a calculation multiple times?

1 回表示 (過去 30 日間)
friedl hulsmans
friedl hulsmans 2017 年 11 月 17 日
コメント済み: friedl hulsmans 2017 年 11 月 17 日
How can I run this calculation multiple times?
c1 = 40 - 10;
c2 = 40 + ((600/210) + (275/21));
c = c1 + rand * (c2 - c1);
fck = 26 + rand * (34-26);
b1 = 300 - ((300/50)+7);
b2 = 300 + ((300/50)+7);
b = b1 + rand * (b2 - b1);
h1 = 600 - ((600/140)+(85/7));
h2 = 600 + ((600/140) + (85/7));
h = h1 + rand * (h2 - h1);
qb = 9.9775+rand *(10.0225-9.9775);
qs1 = 24.9775+ rand * (25.0225-24.9775);
ns1 = 2;
qs2 = 13.9775+ rand * (14.0225-13.9775);
ns2 = 2;
q1 = 0.8*1.5;
q2 = 1.4 * 1.5;
q = q1 + rand * (q2 - q1);
med = 96 * (10^6)+ rand * (144 * (10^6) - 96 * (10^6));
Es = 200000;
fyk = 500;
fcm = fck + 4 +rand * (12 - 4) ;
Ecm = 22000*((fcm/10)^0.3);
Ec = Ecm / (1 + q);
alpha = Es / Ec;
d1 = c + qb + (qs1/2);
d2 = c + qb + (qs2/2);
d = h - d1;
As1 = (pi * ns1 * (qs1^2))/4;
As2 = (pi * ns2 * (qs2^2))/4;
Astot = As1 + As2;
x = ((-alpha *Astot)/b)+ sqrt(((alpha*Astot/b)^2)+((2*alpha*(As1*d+As2*d2))/b));
fctm = 0.3 * (fck ^(2/3));
I = ((b*(x^3)/3))+ alpha * As1*((d-x)^2)+ alpha * As2*((x-d2)^2);
sigmac = med*x /I;
sigmas = alpha * sigmac * (d-x)/x;
h1 = (h-x)/3;
h2 = 2.5*(h-d);
h3 = h/2;
H = [h1 h2 h3];
Aceff = b*min(H);
rhoeff = As1/Aceff;
Srmax = 3.4 * c + 0.17* qs1 / rhoeff;
epsilon1 = 0.6*sigmas/200000;
epsilon2 = (sigmas / 200000)-(0.4*fctm*(1+alpha*rhoeff)/(rhoeff*200000));
epsilon = max(epsilon1,epsilon2);
wk = Srmax*epsilon

採用された回答

Birdman
Birdman 2017 年 11 月 17 日
for i=1:N
_your code goes here_
end
N denotes the number of times your code is going to be operated.
  1 件のコメント
friedl hulsmans
friedl hulsmans 2017 年 11 月 17 日
thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Preprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by