Question

In: Math

Answer all the question below. Table 2: 1 3 5 7 9 11 13 15 17...

Answer all the question below.

Table 2:

1

3

5

7

9

11

13

15

17

19

21

23

25

27

29

31

33

35

37

39

41

43

45

47

49

12.2373551424579

11.7708440253038

11.3114033194700

11.0981090241345

10.9917532871426

10.9633449623870

10.9328985186904

11.0609123182770

11.1447150124713

11.2994243413533

11.4699411879533

11.5862580969086

11.7887055678588

11.9277833926721

11.9332325617172

12.0027754228957

12.0455191817870

11.9895076044597

12.1161492247957

11.9142999902406

11.9523445384738

11.8444716643177

11.8325572681845

11.6394782554936

11.4409836766153

  1.     Visualize data in table 2 in a 2-dimensional plot using Matlab.
  2.     Interpolate data in table 2 to determine a value of temperature when t = 8 and t = 20.
  3.     Formulate a mathematical function for data in table 2 using a curve fitting technique.
  4.     Determine temperature value at t = 8 and t =20 and explain a different with a result from the interpolation technique.

Need to solve this all question. Please Provide the proper solution. Thank you

Solutions

Expert Solution

Please upvote. If you have any doubt, please ask. I will answer as soon as possible !

%**********************************The code in matlab starts below*****************************

%**********************************PART 1 *****************************

% Storing the data before any computation

xdata = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49];

ydata = [12.2373551424579,11.7708440253038,11.3114033194700,11.0981090241345,10.9917532871426,10.9633449623870,10.9328985186904,11.0609123182770,11.1447150124713,11.2994243413533,11.4699411879533,11.5862580969086,11.7887055678588,11.9277833926721,11.9332325617172,12.0027754228957,12.0455191817870,11.9895076044597,12.1161492247957,11.9142999902406,11.9523445384738,11.8444716643177,11.8325572681845,11.6394782554936,11.4409836766153];

% plotting the data figure

plot(xdata,ydata,'x')

hold on

% to plot a fitting curve later

%**********************************PART 2 *****************************

%Interpolating the value(linear interpolation)

y_interpolated= interp1 (xdata, ydata, [8,20]);

fprintf('At X=8, interpolated value of Y= is %.4f \n', y_interpolated(1))

fprintf('At X=20, interpolated value of Y= is %.4f \n', y_interpolated(2))

%**********************************PART 3 *****************************

% FItting the Data with polynomial function

order =4

% here 4 is the order of the polynomial which fits the data well

poly = polyfit(xdata,ydata,4);

% poly contains the coefficients of the polynomial function

%plotting the function

fprintf("The function for the fit is: ")

fprintf('%.7f*X^4 + %.7f*X^3 + %.7f*X^2 + %.7f*X + %.7f = 0',poly(5),poly(4),poly(3),poly(2),poly(1))

%Now plotting the fitted plynomial over the previous plot

x_fit = linspace(1,49,200);

% getting a vector of equally spaced points from 1 to 49

y_fit = polyval(poly,x_fit);

% it calcualtes the polynomial at the x_fit values

plot(x_fit,y_fit)

% plot the polynomial curve over the data points

hold off

%**********************************PART 4 *****************************

%Interpolating the value(from the fitted cuve)

y_interpolated= polyval (poly, [8,20])

fprintf('At X=8, interpolated value of Y(from fitted curve)= is %.4f \n', y_interpolated(1));

fprintf('At X=20, interpolated value of Y(from fitted curve)= is %.4f \n', y_interpolated(2));

%*******************************outputs are below************************************

Console output:

The graph is:

At X=8, interpolated value of Y= is 11.0449 At X=20, interpolated value of Y= is 11.3847 order - 4 The function for the fit is: 12.5695061*X4 + -0.3494972*X^3 + 0.0239355*X^2 + -0.0005554 *x + 0.0000042 = Øy_interpolated - 11.038 11.375 At X=8, interpolated value of Y(from fitted curve)= is 11.0381 At X=20, interpolated value of Y(from fitted curve), is 11.3751

12.5 12 - 11.5 x 11 10.5 0 10 20 30 40 50


Related Solutions

Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...
Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Number of Aides Absent 5 8 11 15 4 2 7 1 4 6 14 19 3 5 8 In which of the following ranges you can find the Upper Control Limit of the control chart? 0.1427 0.1536 0.1677 Not computable with information available In which of the following ranges you can find the Lower Control Limit of the control chart? Does not exit...
student 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...
student 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Test score 67 67 87 89 87 77 73 74 68 72 58 98 98 70 77 Above we have the final averages of the last stats and I want to know if the class average falls within the boundaries of all my statistics classes for the past 20 years. Find the sample size, mean, and standard deviation of the data above (Table 1)....
A B C 13 7 9 29 19 54 25 54 5 17 15 11 21...
A B C 13 7 9 29 19 54 25 54 5 17 15 11 21 22 20 a) Construct ANOVA table and test the null hypothesis: μA = μB = μC b) Assume that you have statistically enough evidence to reject the null hypothesis; suggest an approach to find out whether all three means are different than each other or only one of them is different than others (while the other two means are equal) and if the second...
3) Use the data below to answer the questions that follow X 7 9 11 15...
3) Use the data below to answer the questions that follow X 7 9 11 15 15 17 21 21 21 29 33 34 35 35 Y 22 20 17 17 16 12 10 10 7    4    4    3 1 0 a) Calculate the correlation coefficient “r” b) Explain what your value for r means for this data c) Determine the equation for the linear regression line of this data d) What does your equation predict for...
Elements 1-7 for Sample 1 are 11 7 9 12 13 15 15. Elements 1-7 for...
Elements 1-7 for Sample 1 are 11 7 9 12 13 15 15. Elements 1-7 for Sample 2 are 8 8 6 7 10 15 14.Construct a 95% conf.interval for the mean of the paired sample differences.
Promotional expenses(x) Sales(y 7 12 10 14 9 13 4 5 11 15 5 7 3...
Promotional expenses(x) Sales(y 7 12 10 14 9 13 4 5 11 15 5 7 3 4 a) draw the scatter plot and draw the line of best fit b) Calculate and interpret the correlation between promotional expenses and sales C) Calculate the regression equation( calculate the slope and intercept of the regression line d)Interpret the slop coefficient of regression equation e)Using the regression equation calculate the sales volume with respect to promotional expense of 4. f) Obtain the coefficient...
2, 9, 15, 5, 11, 7, 11, 7, 5, 10 find the population mean, the population...
2, 9, 15, 5, 11, 7, 11, 7, 5, 10 find the population mean, the population variance and the population standard deviation
Match No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14...
Match No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Player A 8 42 56 68 91 123 12 46 57 137 5 80 14 10 19 Player B 38 44 46 59 57 61 48 42 51 39 58 41 55 45 68 1. For the given data set representing the runs scored by two players in last 15 matches, conduct the following analysis: i. Which average you will use to summarize...
3 6 4 8 1 10 2 9 11 12 15 22 3 6 7 5...
3 6 4 8 1 10 2 9 11 12 15 22 3 6 7 5 8 1 12 14 Each column represents a different treatment given to sick rats. Each cell is a different rat. Use statistical analysis and use post hoc testing using contrasts to find the best treatment. Treatment 1: vitamins Treatment 2: prescription pills Treatment 3: brain surgery Treatment 4: shock therapy Treatment 5: dietary changes
Data Set: 5, 9, 11, 14, 15, 17, 19, 23 -Construct a frequency table using 5...
Data Set: 5, 9, 11, 14, 15, 17, 19, 23 -Construct a frequency table using 5 as a starting point and a class of width 7 -Construct a relative frequency histogram. Include the midpoints and boundary points - Find the mean, Variance, and standard deviation without a graphing calculator of the sample data Data Set: 5, 9, 11, 14, 15, 17, 19, 23 Data Set: 5, 9, 11, 14, 15, 17, 19, Data Set: 5, 9, 11, 14, 15, 17,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT