Question

MATLAB write a MATLAB function (1) output a third-order polynomial function with the coefficients as the...

MATLAB

  1. write a MATLAB function (1) output a third-order polynomial function with the coefficients as the input variables; (2) Convert this function to function handle.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

function f = polynomial_3rd(a,b,c,d)
%f = polynomial_3rd(a,b,c,d)
%returns an anonymous function f which evaluates an input x for the 3rd order
%polynomial ax^3 + bx^2 + cx + d
f=@(x)a*x.^3 + b*x.^2 + c*x + d;

If you wanted something else, please clarify it in the comments. I will be happy to help

Add a comment
Know the answer?
Add Answer to:
MATLAB write a MATLAB function (1) output a third-order polynomial function with the coefficients as the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAB - create MATLAB functions to convert kilometers to miles and vice versa according to the...

    MATLAB - create MATLAB functions to convert kilometers to miles and vice versa according to the following conditions. (a) The functions created will have input of miles or kilometers and the output with converted kilometers or miles. (b) The output of the function should be a conversion table. No input for the function is needed. (1 mile = 1 609.344 meter) - function with the following: (1) output a third-order polynomial function with the coefficients as the input variables; (2)...

  • IN MATLAB Write a MATLAB function that can be used by a user to perform polynomial...

    IN MATLAB Write a MATLAB function that can be used by a user to perform polynomial interpolation using Lagrange Interpolation Method on a set of data. You should name your function as YourInitials_Lagrange_interpolation. 1. FUNCTION INPUT: . The input data pairs x and f(x) should be expressed as vectors and are used to construct the interpolation polynomials The interpolating data points/value The order of interpolating polynomials to be used. For this project you code should handle first order, second order...

  • Please help me with this question using Matlab language. Thank you. (7 pts 14 Write a function MyPolyMaker that takes in...

    Please help me with this question using Matlab language. Thank you. (7 pts 14 Write a function MyPolyMaker that takes in as arguments the coefficients for a polynomial of arbitrary degree. The function then returns a function handle that represents the desired polynomial. For example: MyPol k r (1,0,0) >> myfun _ myfun (2) ans wwwww 4 Remark The example above represents the polynomial 1x2+0x+0 MyPolyMake r (1,-1,1,-1,1) myfun myfun (2) ans ww 11 Remark The example above represents the...

  • matlab The error function is a mathematical function that frequently arises in probability and statistics. It also c...

    matlab The error function is a mathematical function that frequently arises in probability and statistics. It also can show up in the solution to some partial differential equations, particularly those arising in heat and mass transfer applications. The error function is defined as 2 e-t dt picture attached This function is actually built-in to MATLAB as the command erf, and here we'll use that function to compute a "true value" with which we can compare results of two interpolation approaches....

  • Write a polynomial function in standard form with leading coefficient 1, degree 4, integer coefficients, and...

    Write a polynomial function in standard form with leading coefficient 1, degree 4, integer coefficients, and some of its zeros are 2, -1, 5i. Show all work.

  • MATLAB HELP PLEASE Write a Matlab function that evaluates a sum of sines at a set...

    MATLAB HELP PLEASE Write a Matlab function that evaluates a sum of sines at a set of points. The first term is just a constant (a coefficient with no sine term). Then, each sine term will have a coefficient before it and then an increasing multiple of the angle inside. For example, consider the sum 3 + 4 sin(9)-1.5 sin (20) 2 sin (40)3 sin (50) We recognize that this is the same as 344sin(101+-1.5 sin (20) + 0 sin...

  • MATLAB Only MATLAB Only MATLAB Only Indicated in the script below, write a function, called arbpoly3,...

    MATLAB Only MATLAB Only MATLAB Only Indicated in the script below, write a function, called arbpoly3, that accepts two inputs: i) a row vector, called c, containing the coefficients of the polynomial, starting with the coefficient for the lowest degree term, which is the constant term. ii) a row vector, called x, which is the set of real numbers where the polynomial is to be evaluated. The output, y, will be a vector containing the values of the polynomial, evaluated...

  • Write a polynomial function in standard form with real coefficients whose zeros include 3, 9i, and...

    Write a polynomial function in standard form with real coefficients whose zeros include 3, 9i, and - 9i A polynomial function with zeros 3, 9i, and - 9i is f(x) = x^3 - x^2 + x- .

  • a) Find False Position function for this data. b) Find the third-order interpolation function with Lagrange...

    a) Find False Position function for this data. b) Find the third-order interpolation function with Lagrange method c) Find the third-order interpolation function with Newton's Divided Difference Method. d)Find the natural spline interpolation function for the same data e)Draw the given points in a row using the False Position function, the third order polynomial obtained by Lagrange and Newton's Divided Difference Method, and the natural spline interpolation function using MATLAB. 4-0 2

  • Using the X and Y values below, write a MATLAB function SECOND_DERIV in MATLAB. The output...

    Using the X and Y values below, write a MATLAB function SECOND_DERIV in MATLAB. The output of the function should be the approximate value for the second derivative of the data at x, the input variable of the function. Use the forward difference method and interpolate to get your final answer. X=[1,1.2,1.44,1.73,2.07,2.49,2.99,3.58,4.3,5.16,6.19,7.43,8.92,10.7,12.84,15.41,18.49]; Y=[18.89,19.25,19.83,20.71,21.96,23.6,25.56,27.52,28.67,27.2,19.38,-2.05,-50.9,-152.82,-354.73,-741.48,-1465.11];

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT