Page 80 -
P. 80

L=length(p);
                                v=x.^[(L-1):-1:0];
                                y=sum(p.*v);



                             In-Class Exercises
                             Pb. 3.13 Show that, for the polynomial p defined by Eq. (3.9), the product of
                                            a                            a
                                          n
                             the roots is (−1 )  0  ,  and the sum of the roots is  −  n −1  .
                                            a                             a
                                             n                            n
                             Pb. 3.14 Find graphically the real roots of the polynomial p = [1  3  2
                             1  0  3].








                             3.5  Examples with the Trigonometric Functions
                             A time-dependent cosine function of the form:


                                                       x = cos(ω t + )φ                    (3.11)
                                                           a
                             appears often in many applications of electrical engineering: a is called the
                             amplitude, ω the angular frequency, and φ the phase. Note that we do not
                             have to have a separate discussion of the sine function because the sine func-
                             tion, as shown in the Supplement, differs from the cosine function by a con-
                             stant phase. Therefore, by suitably changing only the value of the phase
                             parameter, it is possible to transform the sine function into a cosine function.
                              In the following example, we examine the period of the different powers of
                             the cosine function; your preparatory task is to predict analytically the rela-
                             tionship between the periods of the two curves given in Example 3.2 and then
                             verify your answer numerically.

                             Example 3.2
                                                        3
                             Plot simultaneously, x (t) = cos (t) and x  = cos(t) on t ∈ [0, 6π].
                                                1
                                                                2
                             Solution: To implement this task, edit and execute the following script M-file:
                                t=0:.2:6*pi;              % t-array
                                a=1;w=1;                  % desired parameters
                                x1=a*(cos(w*t))^3;        % x1-array constructed


                             © 2001 by CRC Press LLC
   75   76   77   78   79   80   81   82   83   84   85