# MATLAB: Calculating axial stresses of different beams

for loopif statementloopwhile loop

If I have several beams(the number of beams can change ) with different dimensions ( different cross-sectional areas),all these beams are acted upon by the same axial forces of the same magnitude.How can I create a loop or a statement that will calculate the axial stress of each beam at the time using the formala axialstress=axialforce/area

axialforce = a scalar or vector of axial forcesarea = a vector of the cross sectional areasaxialstress = axialforce ./ area;