Need Help Creating Program to Analyze Truss Member Forces!

19 views (last 30 days)
I am trying to create a MatLab program for a project that can find the forces in each member of a 2D static truss. It should mostly consist of matrix math, if else statements, for loops, and while loops, so nothing too too advanced here.
The code should be able to take in user input for the location of any applied forces, how much force in the x / y direction, and if there are any roller or pin supports and where. Given this information, the code should be able to solve for the forces in each member.
As an example problem to give us an idea of how to create this program we are given a data file that contains the numbers for the first and second joints of each member, and how the member is oriented with respect to the x-axis going counterclockwise. So it would be something like this "member1-2 @ 0 degrees" would just be a horizontal member with 1 being the first joint and 2 being the second joint.
So far I have imported the data file and assigned variable "joint_id1" to the column vector of the integer identifer of the first joint of the member, variable "joint_id2" to the column vector of the integer identifer of the second joint of the member, and variable "angle" to the column vector of the angles of members. The data file is 3 columns that lists the integer identifer for the first and second joints of the members and the angles, so 3 columns total.
I am stuck here and not sure where to go. How would I use this information to create a system of equations and have MatLab solve it? How do I actually put the user input into effect? I am confomrtable prompting the user input for the forces in the x and y directions but how would I have my program use that information and plug it into the system of equations? etc.
Thanks!
  1 Comment
Bryan Gonzalez
Bryan Gonzalez on 21 Nov 2019
Hey, do you have a code template to solve member forces?! Im also doing a 2-d truss on Matlab

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!