1. Engineering
  2. Mechanical Engineering
  3. create a script mfile that plots 10x 2 20x...

Question: create a script mfile that plots 10x 2 20x...

Question details

Create a script (m-file) that plots −10x 2 + 20x + 500 over the domain 0 ≤ x ≤ 10, using N samples. (Hint: The line of code to get N samples for x would be x = 0:10/(N-1):10;.) 3 Label the x-axis “x (m)” and the y-axis “Stress (Pa)” and use a line style that has solid black lines connecting filled square points. Add another curve, x 3 −30x, on the same plot. Now use a line style that is red and a dashed line between unfilled circles. Add a legend to differentiate between the two curves. Do all of this using code in the script, not the GUI workspace

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