Question C.3.2: The force-deflection data from Example 1.3.1 for the cantile...

The force-deflection data from Example 1.3.1 for the cantilever beam shown in Figure 1.3.1 is given in the following table.

\begin{array}{l|lllllllll}\text{Force}f( lb ) & 0 & 100 & 200 & 300 & 400 & 500 & 600 & 700 & 800 \\\hline \text{Deflection}x \text{(in.)}& 0 & 0.15 & 0.23 & 0.35 & 0.37 & 0.5 & 0.57 & 0.68 & 0.77\end{array}

Use MATLAB to obtain a linear relation between x and f , estimate the stiffness k of the beam, and evaluate the quality of the fit.

152624-Figure 1.3.1

Note that here x is the dependent variable and f is the independent variable. In the following MATLAB script file the data are entered in the arrays x and f. The arrays xp and fp are created to plot the straight line at many points.

% Enter the data.
x = [0, 0.15, 0.23, 0.35, 0.37, 0.5, 0.57, 0.68, 0.77];
f = (0:100:800);
% Fit a first-degree polynomial.
p = polyfit(f,x,1)
% Compute the stiffness.
k = 1/p(1)
% Compute a set of f, x points.
fp = (0:800);
xp = p(1)*fp+p(2);
% Plot the fitted function and the data.
plot(fp,xp,f,x,'o'), xlabel('Applied Force f (lb)'), ...
ylabel('Deflection x (in.)'), ...
axis([0 800 0 0.8])
% Compute the J, S, and r squared values.
J = sum((polyval(p,f)-x).ˆ2)
S = sum(x-mean(x)).ˆ2)
r2 = 1 - J/S

The computed values in the array p are p = [9.1667 × 10^{−4}, 3.5556 × 10^{−2}]. Thus, the fitted straight line is x = 9.1667 × 10^{−4}f + 3.5556 × 10^{−2}. Note that this line, which is shown in Figure C.3.2, does not pass through the origin as required, but it is close (it predicts that x = 0.035556 in. when f = 0). The quality-of-fit values are J = 0.0048, S = 0.5090, and r² = 0.9906, which indicates a very good fit.

Solving for f gives f = (x − 3.5556 × 10^{−2})∕9.1667 × 10^{−4} = 1091x − 38.7879. The computed value of the stiffness k is the coefficient of x; thus, k = 1091 lb/in.

152624-Figure C.3.2

Related Answered Questions

Question: C.2.3

Verified Answer:

The least-squares criterion is J=\sum_{i=1}...
Question: C.2.2

Verified Answer:

Subtracting 10 from all the x values and 11 from a...
Question: C.2.1

Verified Answer:

These data do not lie close to a straight line whe...