lstsq/script.rst
changeset 338 e4a7d0924143
parent 279 5c9dc3419df5
child 341 9f7eb1ed0e08
equal deleted inserted replaced
337:c65d0d9fc0c8 338:e4a7d0924143
    16      
    16      
    17 .. Author              : Nishanth Amuluru
    17 .. Author              : Nishanth Amuluru
    18    Internal Reviewer   : 
    18    Internal Reviewer   : 
    19    External Reviewer   :
    19    External Reviewer   :
    20    Checklist OK?       : <put date stamp here, if OK> [2010-10-05]
    20    Checklist OK?       : <put date stamp here, if OK> [2010-10-05]
       
    21 
       
    22 
       
    23 .. #[Puneeth: Add pre-requisites.]
    21 
    24 
    22 Script
    25 Script
    23 ------
    26 ------
    24 
    27 
    25 Hello friends and welcome to the tutorial on Least Square Fit
    28 Hello friends and welcome to the tutorial on Least Square Fit
    41 pendulum and the second is the corresponding time period of the pendulum.
    44 pendulum and the second is the corresponding time period of the pendulum.
    42 
    45 
    43 As we know, the square of time period of a pendulum is directly proportional to
    46 As we know, the square of time period of a pendulum is directly proportional to
    44 its length, we shall plot l vs t^2 and verify this. 
    47 its length, we shall plot l vs t^2 and verify this. 
    45 
    48 
    46 #[Puneeth:] removed the explanation about loadtxt and unpack
    49 .. #[Puneeth:] removed the explanation about loadtxt and unpack
    47  option. It's been done in another LO already. simple dependency 
    50 ..  option. It's been done in another LO already. simple dependency 
    48  should work?
    51 ..  should work?
    49 
    52 
    50 To read the input file and parse the data, we are going to use the
    53 To read the input file and parse the data, we are going to use the
    51 loadtxt function.  Type 
    54 loadtxt function.  Type 
    52 ::
    55 ::
    53 
    56 
    64     tsq = t * t
    67     tsq = t * t
    65     plot(l, tsq, 'bo')
    68     plot(l, tsq, 'bo')
    66 
    69 
    67 {{{ switch to the plot window }}}
    70 {{{ switch to the plot window }}}
    68 
    71 
    69 #[Puneeth:] Moved explanation of least square fit here. seems more
    72 .. #[Puneeth:] Moved explanation of least square fit here. seems more
    70 apt. 
    73 .. apt. 
    71 
    74 
    72 We can see that there is a visible linear trend, but we do not get a
    75 We can see that there is a visible linear trend, but we do not get a
    73 straight line connecting them. We shall, therefore, generate a least
    76 straight line connecting them. We shall, therefore, generate a least
    74 square fit line.
    77 square fit line.
    75 
    78 
   130 
   133 
   131  * how to generate a least square fit
   134  * how to generate a least square fit
   132 
   135 
   133 {{{ Show the "sponsored by FOSSEE" slide }}}
   136 {{{ Show the "sponsored by FOSSEE" slide }}}
   134 
   137 
   135 #[Nishanth]: Will add this line after all of us fix on one.
   138 .. #[Nishanth]: Will add this line after all of us fix on one.
   136 This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
   139 .. This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
   137 
   140 
   138 Hope you have enjoyed and found it useful.
   141 Hope you have enjoyed and found it useful.
   139 Thank you
   142 Thank you
   140 
   143 
   141 
   144 
       
   145 .. 
       
   146    Local Variables:
       
   147    mode: rst
       
   148    indent-tabs-mode: nil
       
   149    sentence-end-double-space: nil
       
   150    fill-column: 75
       
   151    End: