subject
Engineering, 14.12.2019 02:31 yyyyyyyyy8938

Write your own implementation of polyval function and name it my_polyval
here is a simple example showiing how polyval function works -

evaluate the polynomial p(x)=3x²+2x+1 at the points 5,7,9 the polynomial coefficients can be represented by the vector [3 2 1].

p = [3 2 1];
x = [5 7 9];
y = polyval(p, x)
y = 1×3
86 162 262
my_polyval needs to be generic. you do not have to use varargin for implementing this, as the function always has two input arguments p and x which are vectors
function:
function y = my_polyval(p, x)
code to call function:
x = [5,7,9];
p1 = [3,2,1];
y1 = my_polyval(p1,x)
p2 = [4,3,2,1];
y2 = my_polyval(p2,x)

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 18:10
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
question
Engineering, 04.07.2019 18:10
The flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
You know the right answer?
Write your own implementation of polyval function and name it my_polyval
here is a simple exam...
Questions
question
History, 04.06.2021 18:20
question
Mathematics, 04.06.2021 18:20
question
Physics, 04.06.2021 18:20
question
Chemistry, 04.06.2021 18:20
Questions on the website: 13722363