- #1
Yoshimoto
- 1
- 0
Homework Statement
As a lab experiment, we must try to measure and calculate the lifetime (τ) of a muon. After all data is collected, the lifetime can be calculate by using the maximum likelihood estimation.
The function on which MLE is applied:
http://j.imagehost.org/view/0139/Schermafbeelding_2010-04-27_om_22_29_38
One of the goals of this experiments is to do the MLE manually. For that I solved al the equations that are given by the definition of MLE. I finally ended with this equation:
http://j.imagehost.org/view/0926/Schermafbeelding_2010-04-27_om_22_29_56
Ta, Tb and N are constants, Ti is the dataset and Tau is the lifetime (this should be calculated).
I know this equation is correct. It should now be solved with mathematical software (I prefer matlab).
Homework Equations
My problem is to solve this in matlab. When i try to do this, it gives me the error:
"The expression to the left of the equals sign is not a valid target for an assignment."
The Attempt at a Solution
This is the code i used:
Ti is a variable with 61565 rows and one columnn=61565;
ta=402e-9;
tb=12e-6;
tau=solve(-n/x*(-n(tb*exp(-tb/x)+ta*exp(-ta/x))/(exp(-tb/x)-exp(-ta/x)))+sum(ti/x)=0,x);
Does anyone know what I am doing wrong?
Thanks!
Last edited by a moderator: