Question
please help ONLY USING MATLAB !!! A solid metal cylinder is subjected to a load, as shown above. The maximum possible stress that the cylinder
please help ONLY USING MATLAB !!!
A solid metal cylinder is subjected to a load, as shown above. The maximum possible stress that the cylinder can sustain before mechanical failure is 75 Pa (75 N/m2). Note, d=50 cm is the cylinder diameter. 1. What is the algebraic solution for the limiting load in N that the cylinder can support? In your code, calculate this value algebraically and assign it to a variable. Output this limiting load to the workspace. 2. Generate 1000 random force values uniformly distributed between 0 N and 30 N, and then determine the percentage of times that the cylinder will fail. Output this percentage to the workspace. [Hint: use (rng shuffle) before calculating the random forces] 3. Time your code using the tic and toc functions. Bonus points will be awarded for the fastest running codes. Put the tic at the beginning of part 2, and the toc at the end after the percentage has been output to the workspace. *HINT: To maximize efficiency, try to avoid using a for loop* 4. Of your 1000 random forces, determine the maximum force for which the cylinder will not fail (maximum safe force). Of your 1000 random forces, determine the minimum force for which the cylinder will fail (minimum unsafe force). Output both values to the workspace. How do these values compare to your answer for question 1? (Make this comparison in a comment, no code is necessary.) F d = 50cm 2 5. Repeat steps 2-4, but using 5000 random values. Once again output the relevant results to the workspace. How much longer does this code take to run relative to part 2? (Make this comparison in a comment.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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