ME 360 HW08 - ME 360 Summer 2014 HW08 Name 1 Use MATLAB polyfit to determine spring constant k and initial pre-tension Fi for the tension spring

ME 360 HW08 - ME 360 Summer 2014 HW08 Name 1 Use MATLAB...

This preview shows page 1 - 3 out of 4 pages.

ME 360 – Summer 2014 – HW08 Name _________________________ 1) Use MATLAB “polyfit” to determine spring constant k and initial pre-tension Fifor the tension spring measured in class. Use “polyval” to provide a plot of your experimental measurements and your linear fit. Provide hardcopy of your code. k EXP _____________ F i _____________ Deadweight [lbf] Hook-to-hook length [inch] Deflection [inch] 1.62 6.62 11.62 16.62 21.62 26.62 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 0 5 10 15 20 25 30 Deflection y [in] Deadweight load F [lbf] ME 360 - tension spring with closed coils measured in class Raw data Linear fit 13.80 lbf/in 4.70 lbf 1.947 0 2.106 0.159 2.443 0.496 2.798 0.851 3.144 1.197 3.564 1.617
Image of page 1
ME 360 – Summer 2014 – HW08 Name _________________________ % hw08.m - ME 360 tension spring experimental data % HJSIII, 13.10.11 % raw data - load F [lbf], hook-to-hook length [inch] raw = [ 1.62 1.947 ; 6.62 2.106 ; 11.62 2.443 ; 16.62 2.798 ; 21.62 3.144 ; 26.62 3.564 ]; F_plot = raw(:,1); h2h = raw(:,2); y_plot = h2h - h2h(1) % do not use first point to fit spring constant F = F_plot(2:end); y = y_plot(2:end); % linear fit p = polyfit( y, F, 1 ); F_fit = polyval( p, y_plot ); % spring constant and pre-tension k = p(1) F_pre = F_fit(1) % graph figure( 1 ) plot( y_plot, F_plot, 'bo' , y_plot, F_fit, 'r-' ) xlabel( 'Deflection y [in]' ) ylabel( 'Deadweight load F [lbf]' )
Image of page 2
Image of page 3

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture