Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project Assignment Expand your Matlab four-bar linkage simulator from project 2. To do this, create a function (fourBarSimMulti.m) for your program that has the
Project Assignment Expand your Matlab four-bar linkage simulator from project 2. To do this, create a function ("fourBarSimMulti.m") for your program that has the following inputs and outputs: INPUTS: 11, 12, 13, 14, Tp, B, 02 start 02enda, n OUTPUTS: 030, 040, 03, 04c, Pxor Pyo, Pxc, Pyc The INPUTS are defined as follows: 1, the length of the ground link [length] 12, the length of the input link [length] 13, the length of the coupler link [length] 14, the length of the output link [length] Tp, the length of the coupler out to point p (as shown in Fig. 1) B, the angle from the coupler to the vector. [rad] 2 start, the initial angle of 0 [rad] 82end the ending angle of 0 [rad] a, the simulation code given as follows: 1, graphical simulation of the open four-bar solution from 02 start to 02 end 2, graphical simulation of the crossed four-bar solution from 02 start to 02end 0, no graphical simulation. In all three cases the function should return all calculated values. The value of a simply decides whether or not the user will see a four-bar simulation appear on the screen. n, number of elements to include from start to 02end (equally spaced points). P 0 X B. 03 7 0 Figure 1: Vector loop of the four-bar linkage. The OUTPUTS are defined as follows: 030, a n x 1 column vector containing the solution of 03 for the open four-bar [rad] 040, a n x 1 column vector containing the solution of 04 for the open four-bar [rad] 03c, a n x 1 column vector containing the solution of 03 for the crossed four-bar [rad] 04c, a n x 1 column vector containing the solution of 04 for the crossed four-bar [rad] Pxo, a n x 1 column vector containing the solution of px for the open four-bar [length] Pyo, a n x 1 column vector containing the solution of py for the open four-bar [length] Pxc, a n x 1 column vector containing the solution of px for the crossed four-bar [length] Pyc, a n x 1 column vector containing the solution of py for the crossed four-bar [length] To help get you started, the function should have the following form. function [t30, 140, t3c, t4c, pxo, pyo, pxc, pyc] = fourBarSimMulti (rl, r2, r3, r4, rp, beta, t2start, t2end, alpha, n) end put code math here As shown above, the function name should be fourBarSimMulti. Ensure that the file name matches the function name, and all spelling and capitalization are correct so the grader code can run yours. Hints: Copy and rename your code from Project 2. Add in the crossed solution math. Set up if- statements or switch case statements to change what plots based on alpha. Use the patch command to make the triangle for the coupler. There are several files on D2L to help you: (1) Project_2p5_Checker.m : change the constants as desired and run to either just view the solution output (see (2) below) or also grade your own code (see (3) below) (2) fourBarSimMultiCorrect.p: call this for a black-box model of how your function should work (3) Auto_Grader_2p5_Function.p: call this to grade your code. It will run two simulations, yours and the solution, and tell you if your function is correct or not. Once your code has passed the check, please upload it to D2L according to the dropbox instructions. If your code does not pass the check, you will earn a 0 for this assignment.
Step by Step Solution
★★★★★
3.39 Rating (161 Votes )
There are 3 Steps involved in it
Step: 1
It seems youre asking for help with creating a Matlab function for simulating a fourbar linkage system based on an assignment brief To complete the pr...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started