Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

One of the things to learn in this course is how to use Matlab or other computat

ID: 3915308 • Letter: O

Question

One of the things to learn in this course is how to use Matlab or other computational tools for helping to solve Statics and other Engineering problems. The best way to learn how to code is by reading code. Below are several un-commented code snippets for computing things you will encounter in Statics.

For this discussion first, describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. Hint: all arrays are components of vectors [ x, y, z ].

Next, write a section of code as described below.

Code 1

Note: ... must be at the end of the line as it is the Matlab way to continue a statement on the next line.

Code 2

Code 3:

Code 4

What should be the result of this snippet?

Your Code

Write a code to compute all 6 permutations of the mixed triple product (Equation 3.37) of the three vectors:

Upload your code and results in the next Canvas page.

Explanation / Answer

Code 1

Output - [13, 6, -3]

Code 2

Output - 6

Code 4

P = [0,3,0]

Q = [0,0,5]

S = [2,0,0]

T1 = dot(P,cross(Q,S))

T2 = dot(P,cross(S,Q))

T3 = dot(Q,cross(P,S))

T4 = dot(Q,cross(S,P))

T5 = dot(S,cross(P,Q))

T6 = dot(S,cross(Q,P))

P = [2,3,5]

//Again Compute all the equations and compare them