Problem 1/MatlabGrader (20 points) (Core Course Outcome 4) Develop a Matlab function myFit Exam that finds the best fit of the function p(t) = a sin³ (t) +bsin² (t) + csin(t) +d (1) to a given set of data points (t., p.) using regression. Here t is in radians. The function input shall be t: column vector of data values t p: column vector of data values p The function output shall be a: scalar containing the best fit coefficient a b: scalar containing the best fit coefficient b c: scalar containing the best fit coefficient c d: scalar containing the best fit coefficient d In the function use only functions developed in this class in modules 1 - 4. You do not need to provide these functions in your submission. They will be provided when assessing your function after the deadline. Note: no assessments will be performed on your submitted function before the exam deadline. Scores on Canvas for this problem before the exam has been fully graded are meaningless. Required submission: well commented function source code submitted to Matlab Grader using the Canvas link for Exam 4 - Problem 1 Problem 2 (15 points) (Core Course Outcome 4) Consider the following unsorted table of measured data points (ti, p.): t 1/4 16 52 1/2 7/2 P 1/2 1 1-1 3/2 1 -2/3 Use your function myFit Exam from problem 1 to determine the coefficients a, b, c, and d in p(t), see Eq. (1), that best fit the data. Print the coefficients with at least 7 significant digitis. Required submission: printout of script source code used to solve this problem in your Gradescope submission; printout of coefficients with at least 7 significant digits in your Gradescope submission; 1 Problem 3 (15 points) (Core Course Outcome 11) Write a script to plot the data points from problem 2 as symbols together with the best fit model p(t) plotted as a smooth line in the same plot for 0

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question
Problem 1/MatlabGrader (20 points) (Core Course Outcome 4)
Develop a Matlab function myFit Exam that finds the best fit of the function
p(t) = a sin³ (t) +bsin² (t) + csin(t) +d
(1)
to a given set of data points (t., p.) using regression. Here t is in radians.
The function input shall be
t: column vector of data values t
p: column vector of data values p
The function output shall be
a: scalar containing the best fit coefficient a
b: scalar containing the best fit coefficient b
c: scalar containing the best fit coefficient c
d: scalar containing the best fit coefficient d
In the function use only functions developed in this class in modules 1 - 4. You do not need to provide these functions in your
submission. They will be provided when assessing your function after the deadline.
Note: no assessments will be performed on your submitted function before the exam deadline. Scores on Canvas for this problem
before the exam has been fully graded are meaningless.
Required submission:
well commented function source code submitted to Matlab Grader using the Canvas link for Exam 4 - Problem 1
Problem 2 (15 points) (Core Course Outcome 4)
Consider the following unsorted table of measured data points (ti, p.):
t 1/4 16 52
1/2
7/2
P 1/2 1 1-1 3/2
1
-2/3
Use your function myFit Exam from problem 1 to determine the coefficients a, b, c, and d in p(t), see Eq. (1), that best fit the data.
Print the coefficients with at least 7 significant digitis.
Required submission:
printout of script source code used to solve this problem in your Gradescope submission;
printout of coefficients with at least 7 significant digits in your Gradescope submission;
1
Problem 3 (15 points) (Core Course Outcome 11)
Write a script to plot the data points from problem 2 as symbols together with the best fit model p(t) plotted as a smooth line in the
same plot for 0 <t<2. Clearly label your plot.
Required submission:
printout of script source code used to solve this problem in your Gradescope submission;
printout of requested figure in your Gradescope submission;
Problem 4 (25 points) (Core Course Outcome 2, 4 & 11)
Write a script to plot the data points from problem 2 as symbols together with both the best fit model p(t) for 0 <t <2 and a
cubic spline for the data points, both plotted as smooth lines. Limit the cubic spline to its range of valid t values for interpolation.
Clearly label your plot. To calculate the spline, use only functions developed in this class. If deemed necessary, you may use
appropriate Matlab data manipulation techniques for the data given in the table of Problem 2, or do these "manually" beforehand.
Required submission:
printout of script source code used to solve this problem in your Gradescope submission;
printout of requested figure in your Gradescope submission;
Transcribed Image Text:Problem 1/MatlabGrader (20 points) (Core Course Outcome 4) Develop a Matlab function myFit Exam that finds the best fit of the function p(t) = a sin³ (t) +bsin² (t) + csin(t) +d (1) to a given set of data points (t., p.) using regression. Here t is in radians. The function input shall be t: column vector of data values t p: column vector of data values p The function output shall be a: scalar containing the best fit coefficient a b: scalar containing the best fit coefficient b c: scalar containing the best fit coefficient c d: scalar containing the best fit coefficient d In the function use only functions developed in this class in modules 1 - 4. You do not need to provide these functions in your submission. They will be provided when assessing your function after the deadline. Note: no assessments will be performed on your submitted function before the exam deadline. Scores on Canvas for this problem before the exam has been fully graded are meaningless. Required submission: well commented function source code submitted to Matlab Grader using the Canvas link for Exam 4 - Problem 1 Problem 2 (15 points) (Core Course Outcome 4) Consider the following unsorted table of measured data points (ti, p.): t 1/4 16 52 1/2 7/2 P 1/2 1 1-1 3/2 1 -2/3 Use your function myFit Exam from problem 1 to determine the coefficients a, b, c, and d in p(t), see Eq. (1), that best fit the data. Print the coefficients with at least 7 significant digitis. Required submission: printout of script source code used to solve this problem in your Gradescope submission; printout of coefficients with at least 7 significant digits in your Gradescope submission; 1 Problem 3 (15 points) (Core Course Outcome 11) Write a script to plot the data points from problem 2 as symbols together with the best fit model p(t) plotted as a smooth line in the same plot for 0 <t<2. Clearly label your plot. Required submission: printout of script source code used to solve this problem in your Gradescope submission; printout of requested figure in your Gradescope submission; Problem 4 (25 points) (Core Course Outcome 2, 4 & 11) Write a script to plot the data points from problem 2 as symbols together with both the best fit model p(t) for 0 <t <2 and a cubic spline for the data points, both plotted as smooth lines. Limit the cubic spline to its range of valid t values for interpolation. Clearly label your plot. To calculate the spline, use only functions developed in this class. If deemed necessary, you may use appropriate Matlab data manipulation techniques for the data given in the table of Problem 2, or do these "manually" beforehand. Required submission: printout of script source code used to solve this problem in your Gradescope submission; printout of requested figure in your Gradescope submission;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY