Why don't you just use the default number of bins, which is 10.
If you end up with fewer than 5 observations in the interior bins, chi2gof() will throw a warning and then you can reduce the number of bins.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!