Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is a data set of 7 column vectors: (U,X,Y, X^2, XY,Y^2, H). Find the coefficients of the best-fitting quadratic to the given data. Hint.

Here is a data set of 7 column vectors: (U,X,Y, X^2, XY,Y^2, H). Find the coefficients of the best-fitting quadratic to the given data. Hint. The sample code line at bottom shows the syntax for computing the dot product of two specific columns. Please use R or R studio if possible!!

library(pracma) data=matrix(c( 1, -2, -2, 4, 4, 4, -1.12 , 1, -2, -1, 4, 2, 1, 1.12 , 1, -2, 0, 4, 0, 0, 2.72 , 1, -2, 1, 4, -2, 1, 3.68 , 1, -2, 2, 4, -4, 4, 4. , 1, -1, -2, 1, 2, 4, 1.12 , 1, -1, -1, 1, 1, 1, 11.38 , 1, -1, 0, 1, 0, 0, 15.28 , 1, -1, 1, 1, -1, 1, 12.82 , 1, -1, 2, 1, -2, 4, 4. , 1, 0, -2, 0, 0, 4, 2.72 , 1, 0, -1, 0, 0, 1, 15.28 , 1, 0, 0, 0, 0, 0, 19.68 , 1, 0, 1, 0, 0, 1, 15.92 , 1, 0, 2, 0, 0, 4, 4. , 1, 1, -2, 1, -2, 4, 3.68 , 1, 1, -1, 1, -1, 1, 12.82 , 1, 1, 0, 1, 0, 0, 15.92 , 1, 1, 1, 1, 1, 1, 12.98 , 1, 1, 2, 1, 2, 4, 4. , 1, 2, -2, 4, -4, 4, 4. , 1, 2, -1, 4, -2, 1, 4. , 1, 2, 0, 4, 0, 0, 4. , 1, 2, 1, 4, 2, 1, 4. , 1, 2, 2, 4, 4, 4, 4. ), nrow=25,ncol=7, byrow=TRUE) print(data) 

## [,1] [,2] [,3] [,4] [,5] [,6] [,7] ## [1,] 1 -2 -2 4 4 4 -1.12 ## [2,] 1 -2 -1 4 2 1 1.12 ## [3,] 1 -2 0 4 0 0 2.72 ## [4,] 1 -2 1 4 -2 1 3.68 ## [5,] 1 -2 2 4 -4 4 4.00 ## [6,] 1 -1 -2 1 2 4 1.12 ## [7,] 1 -1 -1 1 1 1 11.38 ## [8,] 1 -1 0 1 0 0 15.28 ## [9,] 1 -1 1 1 -1 1 12.82 ## [10,] 1 -1 2 1 -2 4 4.00 ## [11,] 1 0 -2 0 0 4 2.72 ## [12,] 1 0 -1 0 0 1 15.28 ## [13,] 1 0 0 0 0 0 19.68 ## [14,] 1 0 1 0 0 1 15.92 ## [15,] 1 0 2 0 0 4 4.00 ## [16,] 1 1 -2 1 -2 4 3.68 ## [17,] 1 1 -1 1 -1 1 12.82 ## [18,] 1 1 0 1 0 0 15.92 ## [19,] 1 1 1 1 1 1 12.98 ## [20,] 1 1 2 1 2 4 4.00 ## [21,] 1 2 -2 4 -4 4 4.00 ## [22,] 1 2 -1 4 -2 1 4.00 ## [23,] 1 2 0 4 0 0 4.00 ## [24,] 1 2 1 4 2 1 4.00 ## [25,] 1 2 2 4 4 4 4.00 

data[,2]%*%data[,1]# Dot product of column 2 and column 1 ## [,1] ## [1,] 0 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Engineering Mathematics

Authors: Erwin Kreyszig

8th Edition

471154962, 978-0471154969

More Books

Students also viewed these Mathematics questions

Question

Discuss the role of technology when integrating the supply chain

Answered: 1 week ago