Question: Please HELP! - MATLAB programming for engineers In this assignment you will write a script as usual, but the script will call on two functions

Please HELP! - MATLAB programming for engineers

In this assignment you will write a script as usual, but the script will call on two functions that you will write. Altogether, you will have three m files to submit.

Please follow the instructions below to complete this problem.

(a) Please HELP! - MATLAB programming for engineers In this assignment you will

(b) write a script as usual, but the script will call on two

1. PART 1: create a vector for the three stress values using the numbers from (a) above. Then create a vector of angles ranging from zero to ninety degrees. Use a sufficiently small step size so that your plots will appear smooth.

2. PART 2: Create a function file named StressTrans.m to handle the stress transformation calculations. The inputs to this function should be as give above, except that th will be a vector of angles, not a scalar. The output will be an array with three columns, one for each stress variable. In your function file, do the following:

a. Calculate the following intermediate vector variables:

functions that you will write. Altogether, you will have three m files

to submit. Please follow the instructions below to complete this problem. (a)

b. Calculate the stresses in the xy directions using the three formulas given above, and making use of the intermediate variables c2theta and s2theta.

c. Store the three sets of stress values in a single output array.

3. PART 3: Create a function file named StressPlot.m to plot your results. The inputs to this function should include the name of the plot, the stress array calculated in StressTrans and the vector of angles. This function will not have any outputs. In your function file, do the following:

a. Plot the three stresses on the same plot as a function of angle

b. Add appropriate axis labels

c. Add the title specified in the function input

d. Add a legend to identify each plotted curve

e. Put gridlines on your plot

4. PART 4: In your main script, call the functions a second time using the numbers from (b) above. Use a different plot title. After running your script, there should be two figures, one for part (a) numbers and another for part (b) numbers.

5. PART 5: add comments to your MATLAB files that include the following:

a. A description of what each major section of code does

b. Your name, and your partners name if you had one

c. Appropriate comments at the start of each function so that the help command will give a short description of what the function does, and the lookfor command will find your functions if reasonable keywords are used.

When finished, there should be three files (C7name.m, StressTrans.m, StressPlot.m)

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!