- Use MATLAB actively to test and verify behavior.
- If a question asks for output, run the code to confirm your answer,
- Use syntax as reviewed in class.
Question 8
Given the speed and mpg data:
speed \( =[30,40,50,60,70] \);
mpg = [35, 33, 31, 29, 27];
Which command correctly estimates mpg at 55 mph using linear interpolation?
interp1(mpg, speed, 55)
interp1(speed, mpg, 55, 'linear')
polyfit(speed, mpg, 1)
interp(speed, mpg, 55)
Previous
Next
Not saved
Submit Qui