Example 1
      The following code uses garchfit to estimate the parameters for a return series of 1000 simulated observations based on a GARCH(1,1) model. Because the 'Display' parameter defaults to 'on', garchfit displays diagnostic and iterative information. 
spec = garchset('C',0,'K',0.0001,'GARCH',0.9,'ARCH',0.05);
[e,s,y] = garchsim(spec,1000);
[Coeff,Errors] = garchfit(spec,y);