Write a user-defined function named Deflection_cougarnetID.m which has one input (position x) and one output, (deflection v). You will need to apply the deflection equation above with the piecewise conditions described. Use this function to determine the deflection at the position entered. Produce a formatted output to the command window that states the deflection at the point entered. HINT: For most of the beam, Eq. 1 results in a negative answer. This implies the deflection is in the downwards direction. TASK 3: Within your user-defined function, create a vector of values for deflection from 0 to the position entered by the user. Create a plot of the theoretical result for deflection (y axis) at each position (x axis).
Shoul also include x-axis label, y-axis label, solid line, and gridlines.
What code do I use to make the plot appear?