chi2gof tells you how closely the observed distribution resembles your theoretical guess. You don't have a distribution yet. To test for a linear trend, you can fit your data to a straight line by least squares.
Start by inspecting the fit visually. A formal test is often not necessary. If you need a formal test, you can assume, as is often done, that the residuals are normally distributed.
Here is doc on linear models:
http://www.mathworks.com/help/stats/parametric-regression-basics.html http://www.mathworks.com/help/stats/linear-regression-1.html
Here is a section showing how to examine the model quality: