kjata090
- 3
- 0
okay so my problem is that I have some data in some arrays z(:,1), u(:,1), s(:,1)
okay I am supposed to use this data with these equations (these are not syntax because I am not sure how to implement this into MATLAB yet)
H = (omega*(1+z)^3 + (1-omega)*(1+z)^(3*(1+w)))^.5
distLum = (1+z)*integral(1/H,0,z) (that is the integral of 1/H with respect to z from 0 to z)
ufit = 5*log(distLum) + M
basically what I need to do is find the minimum of chi^2
chi^2 = sum of data (u - ufit)^2/s^2)
I hope I explained that sort of. you can see this is quite a problem and not exaclt sure how to use MATLAB to do this, I was told fminsearch could do the trick. The values I know are z,u,s. My var/para are omega,w,M.
okay I am supposed to use this data with these equations (these are not syntax because I am not sure how to implement this into MATLAB yet)
H = (omega*(1+z)^3 + (1-omega)*(1+z)^(3*(1+w)))^.5
distLum = (1+z)*integral(1/H,0,z) (that is the integral of 1/H with respect to z from 0 to z)
ufit = 5*log(distLum) + M
basically what I need to do is find the minimum of chi^2
chi^2 = sum of data (u - ufit)^2/s^2)
I hope I explained that sort of. you can see this is quite a problem and not exaclt sure how to use MATLAB to do this, I was told fminsearch could do the trick. The values I know are z,u,s. My var/para are omega,w,M.