What parameter of EEG have u decided to take for studying its chaotic nature ? You might have to look for an ERP and use wavelet methods which is best for feature extraction and then formulate a non-linear dynamical mathematical structure . After that you have to model the trajectory to finally calculate the lyapunov exponent.
There is no standard matlab code available for this job. It depends on what kind of erp feature and chaotic behavior you wish to study. It basically depends on your mathematical model.