Permalink
Cannot retrieve contributors at this time
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?
final_proj_group11/PlotSSS.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (19 sloc)
672 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PlotSSS(maxLoad) | |
%Generates deflections based on all values of distributed load from 1 to | |
%inputted value maxLoad, plots output of deflection against load | |
%Given physical parameters | |
q = [1:maxLoad]; %initialize array of loads for plotting | |
w = zeros(1,maxLoad); %initialize array of deflections for plotting | |
x = 0.5; %location of maximum deflection (constant for all q) | |
%Iterate function for all values of q | |
for n = 1:maxLoad | |
%Place max deflections in an array w | |
w(n) = -shape_simple_support(x,n); | |
end | |
%Plotting routine | |
plot(q,w) | |
setdefaults | |
xlabel('Applied Load (N/m)') | |
ylabel('Max Deflection (m)') | |
title('Applied Load versus Maximum Deflection') | |
end | |