1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Truss analysis with Matlab

  1. Jul 16, 2014 #1


    User Avatar
    Gold Member

    Hello, I have been working on this Truss problem and have not managed to get it right. I have checked my equations over and over and everything seems to check out, but I only get 4/24 on the autograder.

    Here is my paper worked out.

    ImageUploadedByPhysics Forums1405563826.908265.jpg

    Here is my Code. Because I don't like the opposite sign convention from the problem statement, I just used the normal sign convention and multiplied by -1, -(A\b). Whether I keep it -(A\b) or A\b, I still get 4/24 points.
    Code (Text):
    function T = trussAnalyze(Px,Pz)
    A = [cosd(180),cosd(30),0,cosd(270),cosd(atand(3/4)+180),0;
        0, cosd(210),cosd(240),0,0,0;
    b =[0;Px;0;0;Pz;0];
    T = -(A\b);
    I run the autograder and here is an example of the feedback I get
    Code (Text):
    In test case 2:
        'Pure downward loading'

    *Right size and class, but wrong values (even accounting for roundoff)
    Argument 1:

    Argument 2:
    EDIT: Wrote it on a paper and uploaded as PDF so that my work is easier to see.

    Attached Files:

    Last edited: Jul 16, 2014
  2. jcsd
  3. Jul 17, 2014 #2


    User Avatar
    Gold Member

    my -0.6 and 1 were switched
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted