P (X) X P (Y) y

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1. Use MATLAB to compute the roots of the following polynomials.

 p ( x ) =x3 + 8 x 2 +10 x+ 4
 p ( y )= y 5 +7 y 4 +19 y 3 +25 y 2+ 16 y+ 4

2. Use MATLAB to derive the polynomials having the following roots.

 −6.5708 −0.7146+ j 0.3132 −0.7146− j 0.3132


 Two roots at x=2.00∧t h ree roots at x=−3.00

3. Use MATLAB to evaluate the polynomials below at the specific values.


 p ( x ) =x3 + 8 x 2 +10 x+ 4 at x=1.25
 p ( y )= y 5 +7 y 4 +19 y 3 +25 y 2+ 16 y+ 4 at y=−3.75
1. A vector is given
A=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]

Write a script to print out the even number and odd number separately from the above vector by using branch
statements and loop

2. A vector is given:
A= [1 2 3 4 5 6 7 8 9 0]
Write a script to print out the vector content using the fprintf command in a loop such that the printout
will look like:

Vector A is

[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]

Print completed.

3. Develop a function m-file, func_es(x), to compute the following function:


y = 0.5ex/3 -x2sinx

The argument must accept a scalar as well as a vector. Test your function by typing the following on
MATLAB:

func_es(3)

func_es([1 2 3])

You might also like