Answered step by step
Verified Expert Solution
Question
1 Approved Answer
&&&& In MATLAB %%%%% I can't upload the file so just type out what code would be. Thanks. Problem 3: Download the uspopulation.mat file from
&&&& In MATLAB %%%%%
I can't upload the file so just type out what code would be. Thanks.
Problem 3: Download the uspopulation.mat file from Canvas into the same folder as your code and load the data into your Matlab workspace using 'load(uspopulation)'. This native Matlab data file contains population of the U.S. recorded by the U.S. Census (variable 'pop') from 1790-1990 in 10 year increments (variable 'years'). Plot a scatterplot of the US population over these years using red circles. Next, use Matlab to find a quadratic polynomial function that fits the data using the 'polyfit' function. Next, evaluate the resulting polynomial using the 'polyval' function and plot the predicted polynomial fit curve on the same plot using a solid black line to see how the fit curve matches the data. Add a title, x and y label, and a legend to the plot using Matlab commands. Finally, use the 'polyval' function to evaluate the predicted population in 2017. If the actual US population in 2017 was 325.7 million, find the % difference between your predicted value and the actual value (answer should be 1.3 7%). 0/00/0
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