This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
teaching:physics305-fall2011:physics305-fall2011 [2011/02/09 00:01] – kurtisn | teaching:physics305-fall2011:physics305-fall2011 [2012/04/16 20:38] (current) – kurtisn | ||
---|---|---|---|
Line 6: | Line 6: | ||
I provide here some sample code as shown during the lectures. | I provide here some sample code as shown during the lectures. | ||
+ | |||
+ | * Code from 04-11-2012 | ||
+ | * [[.TRandomExample.C|A ROOT script to generate Gaussian distributed random points and histogram them]] | ||
+ | * [[.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]] | ||
+ | * [[.DrawFigures.C|A ROOT script to draw two waveforms and their associated Lissajous figure]] | ||
+ | * [[.DrawAnimation.C|Similar to the above script, but draws an animation of the system evolving]] | ||
+ | |||
+ | * 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 |