Question: Given a vector x, construct in Python the following matrix: Here, xi are the components of the vector x (numbered from zero). Given a vector

Given a vector x, construct in Python the following matrix:

V ||

Here, xi are the components of the vector x (numbered from zero). Given a vector y, solve in Python the linear equation system Va = y. Let the components of a be denoted by ay, i = 0, …, 5. Write a function poly, which has a and z as input and which computes the polynomial:

image

Plot this polynomial and depict in the same plot the points (xi, yi) as small stars. Try your code with the vectors:

  • ·         x = (0.0, 0.5, 1.o, 1.5, 2.0, 2.5)
  • ·         y = (-2.0, 0.5, -2.0, 1.0, -0.5, 1.0)

V ||

Step by Step Solution

3.52 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To construct the matrix V in Python based on the given vector X we can use NumPy library Heres the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!