okay so my problem is that I have some data in some arrays z(:,1), u(:,1), s(:,1)(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Need some help using fminsearch in matlab

Loading...

Similar Threads - Need help using | Date |
---|---|

Matlab Help needed to fix a matlab code | Nov 8, 2017 |

I need help plotting some data using octave | Feb 9, 2013 |

Please I need a Help with matlab code (Controlling the LEGO NXT Using MatLab) | Dec 7, 2012 |

Need help to get the right codes using Mathematica | Sep 1, 2011 |

Need help in MatLab, I haven't used this program in a while | Feb 14, 2007 |

**Physics Forums - The Fusion of Science and Community**