Vous êtes sur la page 1sur 1

16165

Engineering Analysis 1 2014/2015

Activity 9.1: Programming in MATLAB (1)



Each individual student must write one MATLAB script file (*.m) containing the full set of solutions to the
following question. The solution file needs to be checked and recorded by the Tutor during the lab session.


Question

Given the general form of a 5th order polynomial function,

= ! ! + ! ! + ! ! + ! ! + ! + !

determine the roots for the following coefficient values for ,

! = 2.810!! , ! = 4.910!! , ! = 0.02, ! = 0.049, ! = 2.5, ! = 3

a) Generate a plot of the polynomial as a function of , showing all the zero-crossings (roots). Label both
axes appropriately, and add a title to the figure.

b) Solve the equation = 0, calculating all the real solutions for by using the roots function in
Matlab.

Use commented text (denoted by the prefix %) to explain what your script is doing at each step.

1/1

Vous aimerez peut-être aussi