Dear Swarnambiga A,
Hope this is not too late (and what you are looking for, I'm more into proteins...), but I'll give it a shot:
If I understand correctly you are using Affymetrix array data, and you want to map the probe set ID to the corresponding gene.
There exists a bit of example code on how to this task in the documentation regarding exploring microarray gene expression data. Under the subsection 'Annotating Up-Regulated Genes Using Gene Onthology', there is explained what you want to do for some human data. They provide the map between the gene symbols associated with the GO IDs in a MAT-file, but also describe how you can get the latest data for that particlar human set from the GO database with annotations as follows:
GO = geneont('live',true);
HGann = goannotread('gene_association.goa_human',...
HGmap = containers.Map();
for i = 1:numel(HGann)
key = HGann(i).DB_Object_Symbol;
HGmap(key) = [HGmap(key) HGann(i).GOid];
HGmap(key) = HGann(i).GOid;
If you tweak that bit of code for your specific case, I think you will end up with what you want. If not, please provide some more info on what you tried (and what you want to get).