Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB please!! 2. The MATLAB function poly inputs an array of numbers and outputs a polynomial (as a coefficient vector) whose roots are the input

MATLAB please!!

image text in transcribed

image text in transcribed

2. The MATLAB function poly inputs an array of numbers and outputs a polynomial (as a coefficient vector) whose roots are the input numbers. In other words, poly inputs i..., In and outputs ao, ai,., an where 1:0 i-1 Figure out an algorithm for this transformation, and write it in MATLAB as the function function p mypoly(X) You may not call poly within mypoly, and you may not use the Symbolic Math Toolbox (syms, etc.). 1. The Lagrange interpolation formula, evaluates y p), where z is given and p is the (unique) degree-n polynomial that interpolates n+1 given coor- dinate pairs, (ro yo). (rii). , (Tnyn). ("Interpolates" means intersects, i.e., y p) for i 0,1,.. ,n.) (a) Implement this as a Matlab function with the signature function y - linterp(X, Y, x)

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

More Books

Students also viewed these Databases questions

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago

Question

2 The role of economic theory in economics.

Answered: 1 week ago