**A Cantilever Beam Deflection Model**

The deflection of a cantilever beam is the distance its end moves in response to a force applied at the end (Figure 5.5-3). The following table gives the deflection x that was produced in a particular beam by the given applied force f. Is there a set of axes (rectilinear.

semilog. or log-log) with which the data plot is a straight line? If so, use that plot to find a functional relation between f and x.

**• Solution**

The following MATLAB script file generates two plots on rectilinear axes. The data is entered in the arrays deflection and force.

% Enter the data. deflection = 0,0.09,0.18,0.28,0.37,0.46,0.55,0.65,0.74];

force = [0:100:800]; % % Plot the data on rectilinear scales.

subplot(2,l,l) plot (force, deflection, ‘0’ )x label (‘Applied Force (lb) ‘)y label(‘Deflection (in.) ‘),axis([O 800 0 0.8])

**An experiment to measure force and deflection in a cantilever beam.**

**Plots for the cantilever beam example**

The plot appears in the first subplot in Figure 5.5-4. The data points appear to lieon a straight line that can be described by the relation f = k x, where k is called the beam’s spring constant. We can find the value of k by using the poly fit command as shown in the following script file which is a continuation of the preceding script file.

% F ii a straight line to the data. p = poly fit (force,deflection,l);

k = II p(l) % Plot the fitted line and the data.

f = [0:2:800); x = U k; subplot (2,1,2) plot (f , x ,’force,deflection, ‘0’ )

x label(‘Applied Force (lb) ‘),y label(‘Deflection (in.)

axis( [0 800 0 0.8) This file computes the value of the spring constant to be k = 1079 I b/in. Thus the force is related to the deflection by f = 1079 x. The second subplot in Figure 5.5-4 shows the data and the line x = fl k, which fits the data well.

### Related Matlab Homework Assignments