Why am I only getting 4/24 points on my Truss analysis with Matlab?

In summary, the conversation is about a person who has been working on a Truss problem but has not been able to get it right. They have checked their equations and code multiple times, but still only received 4/24 points on the autograder. The person provides their code and explains that they used a different sign convention, which may have affected their results. They also mention that they have uploaded their work as a PDF for better clarity. The feedback from the autograder is also mentioned, stating that the values are incorrect even after accounting for roundoff errors.
  • #1
gfd43tg
Gold Member
950
50
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:
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;
    0,0,cosd(60),cosd(90),0,cosd(180);
    sind(180),sind(30),0,sind(atand(3/4)+180),sind(270),0;
    0,sind(210),sind(240),0,0,0;
    0,0,sind(60),sind(90),0,sind(180)];
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:
In test case 2:
    'Pure downward loading'

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

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

Attachments

  • TrussAnalyze.pdf
    50.8 KB · Views: 303
  • TrussAnalyze attempt 1.pdf
    296.7 KB · Views: 212
Last edited:
Physics news on Phys.org
  • #2
my -0.6 and 1 were switched
 

Related to Why am I only getting 4/24 points on my Truss analysis with Matlab?

1. What is truss analysis and why is it important?

Truss analysis is a method used to determine the internal forces and displacements of a truss structure. It is important because it allows engineers to understand the structural behavior of a truss and ensure its stability and safety.

2. How is Matlab used for truss analysis?

Matlab is a powerful tool for truss analysis as it allows for efficient and accurate calculations of forces and displacements using various numerical methods. It also has built-in functions for matrix operations and solving linear equations, which are essential for truss analysis.

3. What are the steps involved in truss analysis with Matlab?

The first step is to create a mathematical model of the truss using the structure's geometry and material properties. Then, the equations of equilibrium are solved using Matlab to determine the internal forces and displacements. Finally, the results are analyzed and compared to design standards to ensure the truss's stability and safety.

4. Can Matlab handle complex truss structures?

Yes, Matlab has the capability to handle complex truss structures with multiple members and nodes. As long as the mathematical model is accurately created, Matlab can efficiently analyze any truss structure.

5. Are there any limitations to using Matlab for truss analysis?

While Matlab is a powerful tool for truss analysis, it does have some limitations. It may not be suitable for analyzing highly nonlinear or dynamic truss structures. Additionally, the accuracy of the results depends on the accuracy of the mathematical model and assumptions made during analysis.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Differential Geometry
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
2K
  • Programming and Computer Science
Replies
14
Views
4K
Back
Top