Page 80 - MATLAB an introduction with applications
P. 80

MATLAB Basics ——— 65



                                   10 3






                                   10 2






                                   10 1
                                      10 0            10 1            10 2            10 3

                                                        Fig. E1.16 (d)

                       (e)  %Use of stairs command
                            >> t=linspace(0,2*pi,200);
                            >> r=sqrt(abs(3*sin(7*t)));
                            >> y=r*sin(t);
                            >> stairs(t, y)
                            >> axis([0 pi 0 inf]);



                                    1.5


                                      1



                                    0.5


                                      0
                                       0     0.5      1      1.5     2       2.5     3

                                                        Fig. E1.16 (e)
                       ( f ) % Use of bar command4
                            >> t=linspace(0,2*pi,200);
                            >> r=sqrt(abs(3*sin(4*t)));
                            >> y=r*sin(t);
                            >> bar(t,y)
                            >> axis([0 pi 0 inf]);










                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   75   76   77   78   79   80   81   82   83   84   85