You are on page 1of 2

Sol

M File

disp('This software calculates the diameter of the wire');

st=input('Enter the stress in pascals=');

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

a=f/st;

d=sqrt((4*a)/pi);

dia=d*1000;

fprintf('The diameter of the wire in millimeters is =%3.2f\n',dia);

Output

This software calculates the diameter of the wire

Enter the stress in pascals=3060000

Enter the force in newtons=60

The diameter of the wire in millimeters is =5.00

You might also like