Question: modify the code to plot the graphs for the attached problem % Givensxmin = e;X = linspace ( xmin , xmax, 2 0 1 )

modify the code to plot the graphs for the attached problem % Givensxmin = e;X = linspace(xmin, xmax, 201); % set number of points here% Point loads including support reactions% negative force is downward directedPointLoads =[0,18; 6,-20; 14,-12; 24,26];% domain of application of the distributed loadwxmax =32;% This returns an array if x is an arraywLoad = @(x)(x>=wxmin & x 45 figure('Name','Sample Problem 7.4');
46 clf; % Clear any old figure data
47 subplot(3,1,1); % work on FBD the top of 3 axes
48 hold on;
50% Draw a thick line for the beam
51 line([xmin,xmax],[0,0],'Color',[.5,.5,.5],'LineWidth ',8);
52
53% Draw vectors representing point loads
54 plx = PointLoads(:,1); % x locations
55 plf = PointLoads(:,2); % Force values
56 pll = length(plx);
57 plz = zeros(pll,1); % Array of zeros for x component of vectors
58% draw the vectors
59 quiver(plx,plz,plz,plf,'Color', 'red','LineWidth', 2);xlim(xbound);% set x bonds to match on all subplots
hold off;
% Work on the middle shear plot
subplot (3,1,2); hold on;
% Draw a line at y=0
line([xmin, xmax],0,0, 'Color', .5,.5,.5, 'LineWidth ',2);
shear = zeros length (x),1 define the shear array i =1; % index into the X array
for xx = Xif( i >1) if(wpts(i))+(wLoad(X(i-1))+wLoad(X(i)))*dx/2;endif( ip = length(plx) && xx >= PointLoads(ip,1)) ip=ip+1; % Shift to the next Point Loadi=i+1; % Shift to the next shear index
end
plot(X, shear)
area(X,shear, "FaceColor', [.8,.9,1.0]); % Draw the shear plot
%****** Add Titles, Labels Etc. Here ***************
xlim(xbound); % Set plot domain to be the same as other plots
hold off;
% Work on the bending moment plot at the bottom
subplot(3,1,3);hold on;
% Draw a baseline at y=0
line([xmin,xmax],[0,0], 'Color', [.5,.5,.5],'LineWidth ',2);
bending = zeros(length(X),1); % Bending Moment Array
% Trapezoidal Integration of Shear
i=1;
for xx = X bending(i)= bending(i-1)... end absolute values of the shear and bending moment.
Fig. P7.37
 modify the code to plot the graphs for the attached problem

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!