User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
teaching:physics305-fall2011:physics305-fall2011 [2011/02/09 00:00] kurtisnteaching:physics305-fall2011:physics305-fall2011 [2012/04/16 20:33] kurtisn
Line 6: Line 6:
  
 I provide here some sample code as shown during the lectures.  Please read the comments carefully, and remember that in some cases the code was provided to illustrate common bugs or issues, so **do not blindly duplicate** anything in it! I provide here some sample code as shown during the lectures.  Please read the comments carefully, and remember that in some cases the code was provided to illustrate common bugs or issues, so **do not blindly duplicate** anything in it!
 +
 +  * Code from 04-11-2012
 +    * [[.GenerateLinearData.C|A ROOT script to generate linear data with Gaussian smearing of data points]]
 +    * [[.GenerateLinearDataAndPlot.C|A ROOT script almost identical to above, but with plotting built in]]
 +
 +  * Code from 02-16-2011
 +     * [[.MeanAndRMS.cpp|A couple methods for calculating the mean and RMS of an array]]
 +     * [[.RandExample.cpp|Simple generator of random numbers]]
 +     * [[.MCForPi.cpp|Simple Monte-Carlo calculation of pi]]
 +
 +  * Code from 02-15-2011
 +     * [[.PassByValue.cpp|Demonstration of a function with arguments passed by value]]
 +     * [[.PassByReference.cpp|An example of passing by reference]]
 +     * [[.PassArray.cpp|An example of how to pass an array to a function (using a pointer)]]
 +     * [[.Pointers.cpp|Some examples of pointer & reference manipulations]]
 +     * [[.MeanOfArray.cpp|Calculates mean of an array of length that is determined by the user (at run-time)]]
  
   * Code from 02-08-2011   * Code from 02-08-2011
-     * Fraction class, as we made in class:  [[.fraction.h|(header)]] [[.fraction.cpp|(code, w/ main block)\]]]+     * Fraction class, as we made in class:  [[.fraction.h|(header)]] [[.fraction.cpp|(code, w/ main block)]]
  
   * Code from 02-02-2011   * Code from 02-02-2011