Stuff here includes matlab code for truss and frame structural analysis, and code to rotate any matlab plot using the mouse. Actually, the frame and truss analysis are all from the same set of code, cause it's pretty much the same thing. There are three structure definitions, a simple truss, a simple frame, and a not so simple bicycle wheel Warning! Some of the code is commented better than other parts.
To understand and use those scripts, you really need to look at the code that does the solution of the frame/truss problem. Each of the definitions calls the function solve_truss.m (or a more refined version solve_truss_lu.m that uses lu factorization.) This function assembles the global stiffness matrix by calling assemble_k.m, then assembles the loads by calling assemble_loads.m. While doing it's job, assemble_k.m uses the following functions: trussk.m, beam_k.m, beam_nst.m, tensor.m, and column.m
After solving the structure, you can plot the results with the plot_truss.m function. You can also find out the forces in the members with the forces.m function.
Plot_truss.m uses a cool rotation function, called setup_rotate.m . This function, along with two helpers alternate_az.m and alt_az.m allow you to click on any matlab plot (version 4.2 or later I think) and perform a free rotate on it. Moving the mouse vertically controls the viewing altitude and moving horizontally controls the azimuth angle. Clicking again stops the rotation.
The homework 2 truss problem input file for the above solving routines.
This page and all contents are © Eric Soroos 1995-6 (firstname.lastname@example.org)