Page 17 -
P. 17

resent data and perform manipulations on them. For example, enter and note
                             the answer to each of the following:

                                a=2
                                b=3
                                c=a+b
                                d=a*b
                                e=a/b
                                f=a^3/b^2
                                g=a+3*b^2

                             Question: From the above, can you deduce the order in which MATLAB per-
                             forms the basic operations?



                             In-Class Exercise

                             Pb. 1.1 Using the above values of a and b, find the values of:
                                a. h = sin(a) sin(b)
                                         b
                                b. i = a 1/3 3/7
                                        –1
                                c. j = sin (a/b) = arcsin(a/b)







                             1.3  Plotting Points
                             In this chapter section, you will learn how to use some simple MATLAB
                             graphics commands to plot points. We use these graphics commands later in
                             the text for plotting functions and for visualizing their properties. To view all
                             the functions connected with 2-dimensional graphics, type:

                                help plot

                             All graphics functions connected with 3-dimensional graphics can be looked
                             up by typing


                                help plot3
                              A point P in the x-y plane is specified by two coordinates. The x-coordinate
                             measures the horizontal distance of the point from the y-axis, while the
                             y-coordinate measures the vertical distance above the x-axis. These coordi-


                             © 2001 by CRC Press LLC
   12   13   14   15   16   17   18   19   20   21   22