1. Other
  2. Other
  3. matlab program please help with question 3 and how to...

Question: matlab program please help with question 3 and how to...

Question details

MATLAB Program: Please help with question #3 and how to code the iterative loops into the "%Code to plot goes here!"

Truss Bridge Learning goal: See an example of a problem that involves a system of linear equations Consider the truss bridge diagrammed in Figure 1. The bridge is composed of steel beams that are connected at joints or nodes. Each beam exerts a force, Fj, on the nodes that it touches. When the bridge is at rest, these forces balance. A positive force means that the beam is in tension: it is being pulled apart. A negative force means that the beam is in compression: being pushed inwards V3/2 5 10 12 14 13 9 9 0.5 1.5 2.5 3.5 Figure 1: A truss bridge.1 Cars and trucks will pass over this bridge, and we would like to figure out what forces will act on the bridge as its load changes. Let W7, Ws, W9 be the weights, measured in Newtons, of vehicles on the bridge located at nodes 7,8,9, respectively. We can find equations for the unknown forces with Newtons second and third laws of motion These laws yield the following fifteen equations that balance the forces on the nine nodes in the bridge that are free to move.

Problem 3 (Writeup). Learning goal: Use matrices to store and retrieve information, not in a linear-algebra sense. In this problem you will write MATLAB code to create a diagram of the truss bridge like the one below. In the next problem we will use this to display the forces acting within the bridge 1.5 0.5 -0.5 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Create a 9 x 2 matrix called nodes to store a list of z- and y-coordinates of the nodes in the bridge. In each row, the first column should hold the r-coordinate and the second column the y-coordinate. Next create a 15 x 2 matrix beams. Each row will represent a beam by listing the starting and ending node. For example, the tenth row, representing the tenth beam, should be [2, 9] since the tenth beam connects the second and ninth nodes

Begin your plotting code with the following commands. These commands will change the position of iha, ing tre wind dre γ 21111 AXIS :KYLlur厝筑) i.ltlai: ihe :ilYA, U; ODOLIHIHİASLIİ;.. c1f; % clear the figure window set (gcf, position, [20 50 600 250], paperpositionmode, auto) hold on % Code to plot goes here! axis equal; % make aspect ratio 1:1 axis(I-.5 4.5 -.5 1.5]) print (gcf, -dpng, truss_bridge_beams.png); Use a loop to iterate and draw the fifteen beams by drawing straight-line connections between each beams endpoints. For example, to plot the twelfth beam by connecting the third and ninth nodes, we can use the code mybeam [3 9]; plot( nodes (mybeam, 1), nodes (mybeam,2)) In the above, the [3 9] indicates which nodes are at the endpoints of the beam and the 1 and 2 nding on your version ofMAT- Save your plot to file as truss_bridge_beams.png. Note that LAB, the lines you plot may be different colors than those shown above.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution