Code covered by the BSD License
[Column]=makecol(data,for... Used with titleblock, from the shape routines.
[D, Slope]=displace(x,Mom... DISPLACE Displacement of a beam.
[NewState]=straintr(Strai... STRAINTR Stress rotation.
[PriStrains, IPShearMax, ... PRISTRAIN Principal strains.
[PrinciplePlanes]=ppstrai... PPSTRAIN The principle planes of a strain state.
[PrinciplePlanes]=ppstres... PPSTRESS The principle planes of a stress state.
[PrincipleStresses, IPShe... PRISTRESS Principal stresses.
[StrainState]=rosette(eps... ROSETTE Converts strain gauge readings to strain state.
[]=expandaxis(perleft, pe... EXPANDAXIS Extends the current axis in any or all directions.
[]=mohrs(StressState, opt... MOHRS Draws a Mohr's circle.
[]=mohrs2(StrainState, op... MOHRS2 Draws a Mohr's circle.
[]=plotSMD(x,shear,moment... PLOTSMD Plots a Shear Moment and optional Displacement diagram.
[]=plotSMSD(x,shear,momen... PLOTSMSD Plots a Shear, Moment, Slope and Displacement diagram.
[]=showvect(vectors) SHOWVECT Draws a simple diagram showing the input vectors.
[]=showx(x,colour) SHOWX Draws a line across the current axis.
[]=showx(y,colour) SHOWY Draws a line across the current axis.
[]=titleblock=titleblock(... TITLEBLOCK Adds two columns of text within the axis border.
[angles]=findangle (a,b,c); FINDANGLE Finds unknown angles of a triangle.
[area]=diagramintegral(x,y) DIAGRAMINTEGRAL Integral of the given numerical data.
[degrees]=RD(radians) RD Changes a matrix of radian measure to a matrix of degree measure.
[force, placement]=distlo... DISTLOAD Converts a linearly distributed load to a point force.
[force,moment]=reaction(v... REACTION Finds the reaction force and moment needed to balance a force.
[forces]=fixedfixed(x,s,m... FIXEDFIXED Redundant support moments and forces.
[forces]=fixedpin(x,s,m,a... FIXEDPIN Redundant support moments and forces.
[forces]=pinpin(x,s,m,a,E... PINPIN Redundant support forces.
[hypotenuse]=hyp(x,y) HYP Finds the hypotenous of a right triangle.
[leglength]=leg(knownleg,... LEG Finds the leg length of a right triangle.
[magnitude]=mag(inVector,... MAG Returns the magnitude of a vector.
[matrix]=makepins(a,L,sup... MAKEPINS subroutine for redundancy routine.
[moment]=summoment(vector... SUMMOMENT Solves for the moment caused by a set of forces.
[num]=cols(m) COLS Counts the number of columns in a matrix.
[num]=rows(m) ROWS Counts the number of rows in a matrix.
[outVector]=opp(inVector) OPP Returns the equal but opposite vector
[outvalue]=interpolate(x,... INTERPOLATE Linear interpolation for a given value.
[pntload]=dist2x(mags, pl... DIST2X Converts a distributed load to a point force acting in the X.
[pntload]=dist2y(mags, pl... DIST2Y Converts a distributed load to a point force acting in the Y.
[radians]=DR(degrees) DR Changes a matrix of degree measure to a matrix of radian measure.
[reactions]=threevector(k... THREEVECTOR Solves for three force vectors of known direction only.
[reactions]=twovec(knowns... TWOVECTOR Solves for two force vectors of known direction only.
[result]=channel(b,h,bt,l... CHANNEL U-shape shape routine.
[result]=circle(r,req) CIRCLE Circle shape routine.
[result]=comp(part,req) COMP Composite shape routine.
[result]=halfcircle(r,ori... HALFCIRCLE Semicircle shape routine.
[result]=hortrap(b,h,a,p,... HORTRAP Horizontal trapezoid shape routine.
[result]=hortria(b,h,p,req) HORTRIA Horizontal triangle shape routine.
[result]=ibeam(b,h,bt,wt,... IBEAM I-beam shape routine.
[result]=lbeam(hl,vl,ht,v... LBEAM L-beam shape routine.
[result]=obeam(od,id,req) OBEAM Circular tube shape routine.
[result]=quartercirc(r,or... QUARTERCIRCLE Quarter circle shape routine.
[result]=rectangle(b,h,req) RECTANGLE Rectangular shape routine.
[result]=rectangle(b,h,req) RECTANGLE Rectangular shape routine.
[result]=rectube(ob,oh,ib... RECTUBE Rectangular tube shape routine.
[result]=tbeam(b,h,bt,wt,... TBEAM T-beam shape routine.
[result]=vertrap(b,h,a,p,... VERTRAP Horizontal trapezoid shape routine.
[result]=vertria(b,h,p,req) VERTRIA Horizontal triangle shape routine.
[resultant,couple]=sumfor... SUMFORCE Sums a set of vectors into one force vector and a couple.
[resultant]=onevector(kno... ONEVECTOR Vector that is the negative of sum of forces acting at a point.
[sn,tnt]=stresstr(StressS... STRESSTR Stress rotation.
[value]=ispos(x) ISPOS True for positive numbers.
[value]=matprop (name,con... MATPROP Material properties look up.
[vector]=deg2xy(inputs) DEG2XY Converts vectors in degree angles to standard form.
[vector]=rad2xy(inputs) RAD2XY Converts vectors in radian angles to standard form.
[vector]=rise2xy(inputs) RISE2XY Converts vectors in rise-run format to standard form.
[vector]=xy2deg(inputs) XY2DEG Converts vectors in standard form to degree angle form.
[vector]=xy2rad(inputs) XY2RAD Converts vectors in standard form to radian angle form.
[x,y]=showcirc (radius,co... SHOWCIRC Draws a circle on the current axis.
[x,y]=showrect (x,y,coord... SHOWRECT Draws a rectangle on the current axis.
[xmag,ymag,xcor,ycor]=bre... BREAKUP Breaks a standard form force vector into its component parts.
[y]=diagram (x,option,mag... DIAGRAM Creates vectors for use in plotting of diagrams.
move (inVector, coords) MOVE Changes the coordintes of a vector.
rain2ess(StrainState,E,po... STRAIN2STRESS Converts strain to stress.
stress2strain(StressState... STRESS2STRAIN Converts stress to strain.
CH0201.m
CH0301.m
CH0401.m
CH0601.m
CH0602.m
CH0603.m
CH0604.m
CH0605.m
CH0606.m
CH1001.m
CH1002.m
CH1101.m
CH1102.m
CH1103.m
CH1104.m
CH1201.m
CH1202.m
CH1203.m
CH1301.m
CH1302.m
CH1501.m
CH2001.m
CH2002.m
CH2003.m
CH2004.m
CH2005.m
CH2006.m
CH2007.m
CH2008.m
CH2009.m
CH2010.m
CH2011.m
CH2012.m
CH2013.m
CH2014.m
CH2015.m
CH2016.m
CH2017.m
CH2101.m
CH2102.m
CH2103.m
CH2104.m
CH2201.m
CH2202.m
CH2203.m
CH2301.m
CH2302.m
CH2401.m
CH2501.m
CH2502.m
CH2601.m
CH2602.m
CH2701.m
CH2801.m
CH2802.m
CH2803.m
CH2901.m
CH2902.m
CH2903.m
CH2904.m
CH2905.m
CH2906.m
CH2907.m
CH2908.m PointX=0.035; %placement of point B
CH2909.m
CH2910.m
CH2911.m
CH2912.m NormalStressAtA=interpolate(x,Normal./Area,PointAx)
CH3001.m
CH3002.m
CH3101.m Setting up initial data and forces
CH3201.m
CH3202.m End Data Entry %%% Start Matrix Cnstruction
CH3301.m
CH3302.m Bookkeeping cleaning up the workspace
CH3401.m
CH3402.m
CH3403.m
Contents.m Mastering Mechanics I Examples.
Contents.m Mastering Mechanics I Toolbox.
RunAllCode.m
define.m Used to define the material properties look-up table. If you found this
View all files
Mastering Mechanics 1: Using MATLAB 5
by
Doug Hull
20 Aug 2002
(Updated
16 Nov 2009 )
Companion Software
[resultant]=onevector(knowns)
function [resultant]=onevector(knowns)
%ONEVECTOR Vector that is the negative of sum of forces acting at a point.
% ONEVECTOR(KNOWNS) Routine takes a single point acted upon by a set of
% known force vectors and balanced by one unknown force and solves for the
% unknown force. The answer is returned as a standard multi vector format.
% This routine is particularly designed for truss problems.
%
% KNOWNS matrix is in standard multi vector format.
%
% See also REACTION, SUMFORCE, SUMMOMENT, THREEVECTOR, TWOVECTOR.
% Details are to be found in Mastering Mechanics I, Douglas W. Hull,
% Prentice Hall, 1998
% Douglas W. Hull, 1998
% Copyright (c) 1998-99 by Prentice Hall
% Version 1.00
[xmag ymag xcor ycor]=breakup(knowns);
flagx = xcor ~= mean(xcor)*ones(size(xcor));
flagy = ycor ~= mean(ycor)*ones(size(ycor));
if (flagx | flagy)
disp ('In onevec.m all vectors must originate from the same point')
return
end % if not all from same point
resultant=[-sum(xmag) -sum(ymag) xcor(1) ycor(1)];
Contact us