You are on page 1of 2

Stress Examples

Sol

M file
disp('This software calculates the stress in the rectangular bar');

f=input('Enter the force in newtons=');

a=input('Enter the area in millimetersquare=');

st=f/a;

fprintf('The stresss in rectangular bar in mega pascal is =%3.1f\n',st);

Output

This software calculates the stress in the rectangular bar

Enter the force in newtons=15000

Enter the area in millimetersquare=75

The stresss in rectangular bar in mega pascal is =200.0

You might also like