Code covered by the BSD License
-
[binEdges,N]=decayHistogram(d...
decayHistogram : histogram of decay times
-
generateDecayData(sampleTime,...
generateDecayData : simulate the signal from decay of mixture of isotopes
-
pendulumDE(tVals,omega0,start...
Copyright 2008-2009 The MathWorks, Inc.
-
pendulumDataSimulated(x0, pen...
Generate simulated pendulum data and write this to an Excel spreadsheet.
-
pendulumFitFunction(t,y,param...
pendulumFitFunction : returns the fit value of pendulum model to
-
pendulumSimulation(x0,g,len)
pendulumSimulation : Simulation of pendulum
-
readExperimentalData(inFileNa...
readExperimentalData : Read in the pendulum experiment data from an Excel
-
analyseDecay.m
-
lecture_2_mmcd.m
-
View all files
from
MATLAB in Physics - Data Analysis
by Matt McDonnell
The second lecture in a series on using MATLAB in undergraduate physics courses.
|
| [binEdges,N]=decayHistogram(decayTimes,varargin)
|
function [binEdges,N]=decayHistogram(decayTimes,varargin)
% decayHistogram : histogram of decay times
% Copyright 2008-2009 The MathWorks, Inc.
% $Revision: 35 $ $Date: 2009-05-29 15:27:34 +0100 (Fri, 29 May 2009) $
binEdges = 0:0.5:60;
[N,X] = histc(decayTimes,binEdges);
% Ignore the last bin, this contains all events that match binEdges(end)
% Also, reshape into colmun vectors
N = reshape(N(1:end-1),[],1);
binEdges = reshape(binEdges(1:end-1),[],1);
|
|
Contact us at files@mathworks.com