Question

5 2 4 6 Linear spline: s fi+ (x-x) 2) Given the points 40 78 125 256 348 425 X1-x a) Write the correct linear spline equation

b) Perform the interpolation using the equation of (a) above. Show work (3 pts)
d) Use a MATLAB built-in function to find the slope and intercept of a straight line regression (4 pts) xxs intapl e) Write t

f) Check the appropriate box to indicate which of the following y -4.5x+54.2x2- 108.5x +102 two figures represents a curve fi
I need help with parts A B D E and F. Please show hand work for solving A and B while D and E should be matlab codes. How do i pick the right graph for part F?
5 2 4 6 Linear spline: s fi+ (x-x) 2) Given the points 40 78 125 256 348 425 X1-x a) Write the correct linear spline equation to interpolate for x 4.72, simplifying where appropriate to get to the slope-intercept form. (4 pts)
b) Perform the interpolation using the equation of (a) above. Show work (3 pts)
d) Use a MATLAB built-in function to find the slope and intercept of a straight line regression (4 pts) xxs intapl e) Write the MATLAB code to plot the "shape-preserving" cubic spline along with the data points on the same plot. (5 pts) yy=intryl (x, y 4
f) Check the appropriate box to indicate which of the following y -4.5x+54.2x2- 108.5x +102 two figures represents a curve fit according to (4 pts) Explain your decision briefly. be as el I has a third deafee so t curve 4
0 0
Add a comment Improve this question Transcribed image text
Answer #1

2 40 78 2-S 2St 348 L42S spline e Lihear * Kgz ly.72. = .72 ies beth yo 2SE - Y = 5 K1-Ho. Y 253 548-256) (X-4) (S-4) 1 + 25乙

Q. C & Q.D

MATLAB CODE------------

clc;
clear all
x=[1 2 3 4 5 6]
y=[40 78 125 256 348 425]
P=polyfit(x,y,3);
fprintf('Cubic interpolated equation is y=%d*x^3+%d*x^2+%d*x+%d\n\n\n',P)
ynew=polyval(P,x)

plot(x,y,'*')
hold on
x=1:0.01:6;
y=-4.52778*x.^3+54.2381*x.^2-108.52*x+102;
plot(x,y)
hold off
fprintf('\nLinear Regression results\n')
% Code for linear regression to find slope and intercept
P1=polyfit(x,y,1);
slope=P1(1)

intercept=P1(2)

RESULTS#############################################OUTPUT--------------------------------

x =

   1   2   3   4   5   6

y =

    40    78   125   256   348   425

Cubic interpolated equation is y=-4.52778*x^3+54.2381*x^2+-108.52*x+102


ynew =

    43.190    65.690   142.333   245.952   349.381   425.452


Linear Regression results
slope =  87.704
intercept = -100.49

 
500 400 300 200 100 1 2 3 A 5 6

F) Answer to F

Interpolated curve will not pass exactly through given data points hence curve 1 is correct.

Also from above matlab graph you can see

Add a comment
Know the answer?
Add Answer to:
I need help with parts A B D E and F. Please show hand work for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A wind tunnel test conducted on an airfoil section yielded the following data between the lift...

    A wind tunnel test conducted on an airfoil section yielded the following data between the lift coefficient (CL) and the angle of attack (?): 12 1.40 16 1.71 20 1.38 de CL 0.11 0.55 0.95 You are required to develop a suitable polynomial relationship between ? and CL and fit a curve to the data points by the least-squares method using (a) hand calculations and (b) Matlab programming Hint: A quadratic equation (parabola) y(x)-aa,x +a x' can be used in...

  • i need the answers to b c d e and f Q3. 120 pts) There is...

    i need the answers to b c d e and f Q3. 120 pts) There is some indication that consumption of moderate amounts of wine can help prevent heart attacks. Below is a plot and summary of yearly wine consumption (liters of alcohol fromm drinking wine, per person) and yearly death rates from heart disease (deaths per 100,000 for a of & n contries Heart discase death rate167 131 220 71 107 167 115 236 Alcohol from wine Heart death...

  • Need help, please show work Blank options for B, E, and F are either 'steeper or flatter." Blank ...

    Need help, please show work Blank options for B, E, and F are either 'steeper or flatter." Blank options for C are "decreases in taxes or increase in govt purchases." This problem asks you to analyze the IS-LM model algebraically. First the consumption function and investment function from the goods market will be examined. Then, the money demand function from the money market will be examined. The Goods Market: Suppose consumption is a linear function of disposable income: C(Y- Ta...

  • I need help answering these questions MULTIPLE CHOICE. Choose the one alternative that best completes the...

    I need help answering these questions MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answer the question. 1) The purpose of a linear regression line is to A) calculate the correlation coefficient B) display the bivariate distribution of X and Y C) identify the mean of the X and Y variables D) predict one set of scores from another set 2) The general equation for a straight line is expressed as A) Y - X- B)...

  • need help solving and checking answers Evaluate each function for the given value of x, and...

    need help solving and checking answers Evaluate each function for the given value of x, and write the input and output as an ordered pair. Need help? Check out these resources: http://virtualnerd.com/algebra 1/linear-equation-analysis/point- slope-standard-form/standard-form-examples/write-linear- equation standard-form-slope-point 27. f(x) = 3x - 7 for x = 6 28.g(x) = 9x - 5 for x = 3 29.h(x) = 12x for x = 4 30.t(x) = 8x - 5 for x = 7 Linear Functions and Slope Intercept Form You can use...

  • Please help to answer this question and show the work clearly because I want to learn....

    Please help to answer this question and show the work clearly because I want to learn. I will give thumbs up for sure, thank you very much!!! lebi, 03134\. The Assume that a circuit has the impulse response of h(t)= { 10, elsewhere input x(t) to the circuit is given by x(t)=6u(t), where u(t) is the unit step function. Assume that the circuit output is given by y(t). a) (20 pts) Use the convolution integral to derive the expressions for...

  • I really need your help to answer this question for Tables 1 - 5. Thank you...

    I really need your help to answer this question for Tables 1 - 5. Thank you so much I appreciate it!!! For each set of values, determine whether an exponential function is a good model. If so, find the function. If not, explain why. Part C-Linear and Exponential Models (possible 15 points) You can transform an exponential function into a linear function by taking the logarithm of each side. Since linear models are easy to recognize, you can then determine...

  • Solve d,e and f please using R code Part I: qqplots This part deals with qqplots...

    Solve d,e and f please using R code Part I: qqplots This part deals with qqplots of all kinds. Let's do some easy expe riments, first. Let's take a sample from a normal distribution with mu-2, sigma 3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size x norm(n,2,3) # Sample from N(mu-2, sigma-3) hist(x) # Looks normal. But that depends on breaks. qqnorm(x) # This doesn't depend on binsize, and...

  • i need help with all question 5 please! thank you Question 5: Use the data below...

    i need help with all question 5 please! thank you Question 5: Use the data below to construct a Michaelis-Menton curve of velocity vs. [S]. This is quite easy to do in Excel. Vo (UM/s) a) Estimate Vmax from your curve. b) Describe any difficulty you have in completing part (a). Is the enzyme saturated at the highest [S]? c) Using your Vmax estimate, calculate ! Vmax, and using your curve, estimate Km. 1/[S] M 8 1/VO (s/UM) 3.85E-03 [S]...

  • i neeed help for my qz2 this one is visual basic , i dont understand how...

    i neeed help for my qz2 this one is visual basic , i dont understand how to write code QZ2: Linear Regression (100 points) Given: A data table (see next page) Find: 1. Use one-dimensional array to find the equation of least-squares-fit line (slope and y-intercept; 10 points each), correlation coefficient and coefficient of the determination (10 points each) 2. Use two-dimensional array to find the equation of least-squares-fit line (slope and y-intercept; 10 points each), correlation coefficient and coefficient...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT