Dear Niraj,
If you're doing ERP analysis there's an SPM method for computing a weighted average instead of the usual mean to compute the ERP from single trials - see SPM manual.
If you're doing something more general there's a function called spm_r_glm.m in toolbox/mixture that fits a robust GLM whatever data you call it with. See eg. spm_rglm_demo in same folder. You can get the paper from here:
http://www.fil.ion.ucl.ac.uk/~wpenny/publications/wp_rglm_07.pdf
If you're doing fMRI the Robust model is an option for first level analysis (SPM uses the spm_r_glm.m routine voxelwise). Select Estimate->Bayesian 1st level->Method->Noise priors->Robust.
Best,
Will.