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

Best Answer

  • E.g., maybe using the element-wise division operator is all you need:
    axialforce = a scalar or vector of axial forces
    area = a vector of the cross sectional areas
    axialstress = axialforce ./ area;