Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
% Problem 1, a
% Plot q vs the maximum deflection of the beam.
% Set text size for plotting.
clear
clc
setdefaults
% x is a vector of the length of the beam [meters].
x = 0:0.01:1;
% Define load as a vector
q = 0:10000;
% Plot the deflection against the location when x is a vector from 0 to 1.
% This plot will be used to identify the x position of the maximum
% deflection.
w = shape_simple_support(x,100);
figure;
plot(x,w);
title('Beam Deflection vs. Horizontal Distance');
xlabel('x [m]');
ylabel('w [m]');
% Looking at the previous plot, it is evident that the max deflection
% occurs in the center of the beam:
x_max = 0.5;
for i = 1:10001
% The max deflection is a function of the position where the max
% deflection is located (middle of the beam) and the distributed load.
w_max(i) = shape_simple_support(x_max,q(i));
end
% Plot q vs the maximum deflection.
figure;
plot(w_max,q);
title('Distributed Beam Loading vs. Maximum Deflection');
xlabel('\delta_{x} [m]');
ylabel('q [N/m]');