Question: I NEED TO USE MATLAB FORMAT FOR THIS QUESTION Use these equations to calculate the values needed: = ( + )/2 Where is the spring

I NEED TO USE MATLAB FORMAT FOR THIS QUESTION

Use these equations to calculate the values needed: = ( + )/2 Where is the spring wire length, is the number of coils in the spring, is the outer diameter of the spring, and is the inner diameter of the spring. = ( )2 Where is spring mass and is the spring metal density. All springs in the system will be made with the same high-carbon steel. The steel, oil tempered ASTM A 229, has a density of 7.861 g/cm3. Program must work within a larger program structure so you must write it as a function based on what you know about the spring project and the other parts of the larger program. You know the following information: Your function will require two inputs: one input is the inner and outer diameters of the spring, the other input is the number of coils in the spring. The diameters and number of coils must meet certain criteria: o The diameter input variable must be a 2-element vector and the number of coils input must be a scalar. o The first element of the diameter vector must be the inner diameter (i.e., the smaller diameter). The inner diameter cannot be greater than 95% of the outer diameter. o Both elements within the diameter vectors must be lengths between 2.5 cm and 30 cm, inclusive. o The spring must have at least 4 coils. Your function must return two output arguments: wire length (scalar) and spring mass (scalar)

Function must follow flow chart

I NEED TO USE MATLAB FORMAT FOR THIS QUESTION Use these equations

Once you have your function working, run it with the following test cases:

Test Case: Number of Coils :Diameters (cm) 1 :11: [9 13]

2: 5: [.5 2]

3: 2: [15.25 20.5]

4: 13: [4 5.5 6.4]

5:11: [13.5 15.5]

6: 9: [5 6.5]

7: 15: [0.5 2]

For each test case, paste your function call and printed display into the RESULTS section of your script as comments. Must include the function call for each test case with the results.

Get diameter vector from input arguments Define the spring metal density

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!