Question: In mechanical engineering, a team is designing a suspension system for a vehicle. They need to model the behavior of the system's shock absorbers under
In mechanical engineering, a team is designing a suspension system for a vehicle. They need to model the behavior of the system's shock absorbers under different loading conditions. To accurately predict the system's response, the team wants to fit a mathematical curve to the experimental data obtained from testing the shock absorbers Additionally, they need to interpolate intermediate values to estimate the system's behavior at specific load levels.
The team has collected discrete data points representing the relationship between the load applied to the shock absorbers and the resulting damping force. They need to perform curve fitting, interpolation, and approximation to analyze the system's behavior.
Your task:
Write a function that performs curve fitting using polynomial regression.
Inputs: xvalues, yvalues, and degree
Output: the coefficients
Write a function to evaluate a polynomial at a given x value see hint above
Inputs: coefficients, x
Outputs: coefficients, x
Write a main function that takes in two arguments and prints out the outputs of the above functions.
Inputs: load, dampingforce, polynomialregressiondegree
Use interpd from scipy.interpolate to get each interpolation function, then use as the interpolation value.
All in python please
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
