//Example 5.5 S=80*10^9;//Shear modulus (N/m^2), See Table 5.3 r=0.750*10^-3;//Radius of nail (m) A=%pi*r^2;//Cross-sectional area of nail (m^2) delta_x=1.8*10^-6;//Amount of flex (m) L_0=5*10^-3;//Original length (m) F=S*A*delta_x/L_0;//Weigth of the picture (N) m=F/g;//Picture's mass (kg) printf('Mass of the picture = %0.1f kg',m) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest