In order to start your research in WSN using MATLAB you first must identify your problem statement. I suggests you to start from the routing protocols in WSN. There are lot of codes available online of WSN in routing protocols.
I agree with Mateen, for simulation of WSN in Matlab you had to understand the basics of routing protocols in WSN. You can go through the various codes available on congestion and routing in wsn networks.Try the ACO protocol and the sample code for the further study.
Thanks all for guiding, Actually I had done theoretically some work on routing algorithms, and now I have to prove my idea via simulation. I intend to do the same via MATLAB, But I have never used MATLAB before and unable to get start. Can anybody guide in this regards?