1 answer

Please help out writing this MATLAB program using recursion.. Chebyshev polynomials are defined recursively. Chebyshev polynomials...

Question:

Image for Please help out writing this MATLAB program using recursion.. Chebyshev polynomials are defined recursively. C

Please help out writing this MATLAB program using recursion.. Chebyshev polynomials are defined recursively. Chebyshev polynomials are separated into two kinds: first and second. Chebyshev polynomials of the first kind. T(x), and of the second kind. Un(x). are defined by the following recurrence relations: Write a function with header [y) = myChebyshevPoly 1 (n,x), where y is the n-th Chebyshev polynomial of the first kind evaluated atx. Be sure your function can take array inputs for x. You may assume that x is a row vector. The output variable, y. must be a row vector also. Test Cases:

Answers

function [y] = myChebyShevPoly1(n, x)
   if n==0
   y = ones(1,length(x));
   elseif n==1
   y = x;
   else
   y = 2.*x.*myChebyShevPoly1(n-1, x) - myChebyShevPoly1(n-2, x);
   end
end

myChebyShevPoly1(0, 1:5)
myChebyShevPoly1(1, 1:5)
myChebyShevPoly1(3, 1:5)

.

Similar Solved Questions

1 answer
For five of the oligosaccharides, containing molecules or rides describe the oligosaccharide makeup, the type(s) and...
For five of the oligosaccharides, containing molecules or rides describe the oligosaccharide makeup, the type(s) and orientation of the saccharine and how that is made possible by the composition and structure of the saccharine. a) cellulose b) chitin c) amyl pectin d) hyaluronic acid g) glycosamino...
1 answer
Signment Score: 8.8% Resources Hint Check Answer estion 20 of 26 ) Name each compound CH.CH...
signment Score: 8.8% Resources Hint Check Answer estion 20 of 26 ) Name each compound CH.CH 10 90 deler ERTU...
1 answer
3. Based on your results, how does light intensity effect photosynthesis? 4. Plants use photosynthesis to...
3. Based on your results, how does light intensity effect photosynthesis? 4. Plants use photosynthesis to make for the plant. 5. What do plants need in order to perform photosynthesis? NELLE 6. How is the plant able to obtain each "ingredient?" 7. Identify the plant cell organelle in which p...
1 answer
10 Discuss the physical changes that occur during middle adulthood, What are some things that can...
10 Discuss the physical changes that occur during middle adulthood, What are some things that can be done to reduce the impact of these changes? Incorporate the text to back up your statements by paraphrasing what you have read. You must include the book or an article at the end of your discussion a...
1 answer
Remaining Time: 47 minutes, 16 seconds. Question Completion Status: Save Answer Question 15 10 points The...
Remaining Time: 47 minutes, 16 seconds. Question Completion Status: Save Answer Question 15 10 points The two plates of a capacitor holds +2500 x 10-6 and -2500 x 10-6C of charge, respectively, when a potential difference is 690 V. What is the capacitance, a 3.62 X 1067 0 6. 248 OC,2.60 X10-6 d. 1.7...
1 answer
What is energy of a photon whose momentum is equal to that of a 10-MeV electon?...
What is energy of a photon whose momentum is equal to that of a 10-MeV electon? Note: The book shows the answer is 10.5 MeV...
1 answer
Just need the answer to number 2. Thanks HIM 3322-COST CONCEPTS- NAME Joseph Castellano SEMI VARIABLE...
Just need the answer to number 2. Thanks HIM 3322-COST CONCEPTS- NAME Joseph Castellano SEMI VARIABLE COS CORE $1200 C- February Agnil Stay ,820 4,420 2.750 luly 4,420 4,470 4,250 1,900 $3,720 Use the High-Low Method to detemine the Total Fised and Total Variabile Cosots (fhom the repair espense abo...
1 answer
The weight of your 1420 kg car is supported equally by its four tires, each inflated...
The weight of your 1420 kg car is supported equally by its four tires, each inflated to a gauge pressure of 32.0 lb/in2 . What is the area of contact each tire makes with the road? If the gauge pressure is increased, does the area of contact increase, decrease, or stay the same? What gauge pressure ...
1 answer
2. Explain the regioselectivity observed in the product of the dipolar cycloaddition 3. Azides are often...
2. Explain the regioselectivity observed in the product of the dipolar cycloaddition 3. Azides are often used in [3+2] cycloadditions to form fluorescent markers used in biochemistry What are some safety concerns of azides? 4. Intramolecular Diels-Alder reactions have become increasingly important i...
1 answer
Relativity problem. Two particle beams, A and B, are travelling collinearly, beam A with a velocity...
Relativity problem. Two particle beams, A and B, are travelling collinearly, beam A with a velocity corresponding to = 10,000, while the other, beam B, has a velocity corresponding to =1,000....
1 answer
Will rate lifesaver!
An electron initially at rest recoils after a head-on collision with a 6.79-keV photon. Determine the kinetic energy acquired by the electron. (In a head-on collision,the photon has a scattering angle of ? = 180°.)keV...
1 answer
A nurse is caring for a client in the manic phase of bipolar disorder. Identify five...
A nurse is caring for a client in the manic phase of bipolar disorder. Identify five clinical manifestations associated with this phase of bipolar disorder....
1 answer
Question 35 Which statements are correct regarding platelets? Select all that apply Platelet formation is stimulated...
Question 35 Which statements are correct regarding platelets? Select all that apply Platelet formation is stimulated by the hormone thrombopoietin. O Platelets increase in the bone marrow. □ Platelets have a lifespan of less than 7 days. Platelets spend one-third of their lives in the spleen. ...
1 answer
This Tes 4 of 13 (1 complete) This Question: 1 pt Assume that the significance level...
This Tes 4 of 13 (1 complete) This Question: 1 pt Assume that the significance level is α-0.05. Use the given information to find the P-value and the critical value(s). The test statistic of z-1.23 is obtained when testing the claim that p 0.2. Click here to view page 1 of the Normal table. Cl...
1 answer
Find the interest on the following loan. $1800 at 6.5% for 3 months. The interest is...
Find the interest on the following loan. $1800 at 6.5% for 3 months. The interest is $____....
1 answer
Estimate the lifetime of sun whether your source was: a) Potential gravitational b)Energy of nuclear fusion...
Estimate the lifetime of sun whether your source was: a) Potential gravitational b)Energy of nuclear fusion of hidrogen and helium on PP cicle c)Calculate the minimal mass of a star with lifetime equal to universe's age, or 13.7 billions of years...