Answered step by step
Verified Expert Solution
Question
1 Approved Answer
programing matlab Lab 4: Least squares and curve fitting Exercises 1) Express the following polynomials as row vectors of coefficients: 2x - 3x2+x+5 3x +
programing matlab
Lab 4: Least squares and curve fitting Exercises 1) Express the following polynomials as row vectors of coefficients: 2x - 3x2+x+5 3x + x + 2x - 4 2) Find the roots of the equation f(x) = 3x - 2x - 5. Also, create x and y vectors and plot this function in the range from 3 to 3 in order to visualize the solution 3) Evaluate the polynomial expression 3x' + 4x + 2x - 2 at x = 4* - 6, and x8. 4) The voltage in a circuit is determined at various times, as follows: time: 1 2 3 4 5 6 7 voltage: 1.1 1.9 3.3 3.4 3.1 3.3 7.1 Fit a straight line through the data points, and then plot this line along with the sample voltages. According to your straight line, determine at what time the voltage would be 4.5V. 5) The temperature (in degrees Fahrenheit) was recorded every three hours for a day at a particular location. Using a 24-hour clock where midnight is 0. for example, the data might be Time: 0 3 6 12 15 18 21 Temp: 55.5 52.4 52.6 55.7 75.6 77.7 70.3 66.6 a) Create vectors for the data. b) Plot the data c) Find a curve that fits the data. d) At what times) was it 60 degrees? 65 degrees? 6) The distance (in miles) and speed of a car (in miles per hour) are measured at several points along a highway and are to be stored in a file and then read into a variable called tripdata.xlsx. For example, tripdata might contain: 1 44 10 45 SO 65 100 60 150 55 PAGE 1 OF 2 LAB MANUAL THE PROGRAMMING TOOLS FOR ELECTRICAL ENGINEERING It may be assumed that there are two columns, the first is the distance, and the second is the speed. It may not be assumed that the number of rows is known. The algorithm is: a) Create the data file and load it into a matrix variable, then separate the data into two vectors. b) Fit a straight line to the data. Plot the data points and the line on the same graph, with appropriate labels on the axes (not just x and y!). 7) Use the polyder function to find the derivative of 2x -x + 4x - 5 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