Azzera filtri
Azzera filtri

How to execute other statement in an if loop if a condition is satisfied

1 visualizzazione (ultimi 30 giorni)
if not(spcng_prov <= bar_dia) && d_prov >= d_req && Ast_prov >= Ast_req
fprintf('Since the actual depth provided is greater than the depth required and the Area of Tension Steel provided is greater than the Area of Tension Steel required. Hence it is evident without further proof that the section is safe in flexure.')
elseif spcng_prov < bar_dia
fprintf('Since the spacing provided is less than the Minimum spacing required, hence the bar diameter has to br changed to meet the spacing requirements')
bar_dia = 25;
fprintf('New Diameter of Bar = %d' , bar_dia)
if (Ast_min < Ast_req) && (Ast_req <Ast_max)
bars_numbr = ceil(Ast_req/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
elseif Ast_min > Ast_req
bars_numbr = ceil(Ast_min/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
elseif Ast_req > Ast_max
bars_numbr = ceil(Ast_max/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
end
fprintf('Number of Steel Bars provided = %d' , bars_numbr);
fprintf('Area of tension Steel provided = %d' , Ast_prov);
spcng_prov =ceil(vpa((b - (2*clr_cover + bars_numbr*bar_dia + 2*stirup))/(bars_numbr - 1)))
fprintf('Since the actual depth provided is greater than the depth required and the Area of Tension Steel provided is greater than the Area of Tension Steel required. Hence it is evident without further proof that the section is safe in flexure.')
elseif spcng_prov < bar_dia
fprintf('Since the spacing provided is less than the Minimum spacing required, hence the bar diameter has to br changed to meet the spacing requirements')
bar_dia = 32;
fprintf('New Diameter of Bar = %d' , bar_dia)
if (Ast_min < Ast_req) && (Ast_req <Ast_max)
bars_numbr = ceil(Ast_req/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
elseif Ast_min > Ast_req
bars_numbr = ceil(Ast_min/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
elseif Ast_req > Ast_max
bars_numbr = ceil(Ast_max/((pi/4)*bar_dia^2));
Ast_prov = bars_numbr*(pi/4)*bar_dia^2;
end
fprintf('Number of Steel Bars provided = %d' , bars_numbr);
fprintf('Area of tension Steel provided = %d' , Ast_prov);
spcng_prov =ceil(vpa((b - (2*clr_cover + bars_numbr*bar_dia + 2*stirup))/(bars_numbr - 1)))
fprintf('Since the actual depth provided is greater than the depth required and the Area of Tension Steel provided is greater than the Area of Tension Steel required. Hence it is evident without further proof that the section is safe in flexure.')
end
after executing the condition of bar dia 25 i want to check again for spacing and then execute accordinly if the statement is true or false

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by