Question: Write a function called poly_val that is called like this p poly val (ce,c,x), where ce and x are scalars, and p is a scalar.

 Write a function called poly_val that is called like this p

Write a function called poly_val that is called like this p poly val (ce,c,x), where ce and x are scalars, and p is a scalar. If e is an empty vector, then pace. If e is a scalar, then p .cetc. Otherwise, p equals the polynomial, where n is the length of the vector c. Hints 1. The functions isempty, isscalar, iscolumn, and length will tell you everything you need to know about the vector c. 2, when c is a vector, use an element by element exponent to determine the vector (r123z"]. 3. When c is a vector, use the sum function with element by element multiplication. Matrix multiplication could also be used, but we have not yet covered that. Here are three example runs: >> p poly_val(-17,[1,see0) >> p poly_val(3.2,[3, -4,10],2.2) (C 96.9280 >> p - poly_val(1,[1,1,1,1],10) >> p = poly-val (8,5,4) 28

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!