You should always try to use the right tool for the job. Matlab is not the right tool for general MANET simulation, unless you want to greatly simplify the problem. If you want to include all of the nuances of specific MAC and network-layer protocols, you need to use something like NS3, OMNeT++, Exata etc.
You should always try to use the right tool for the job. Matlab is not the right tool for general MANET simulation, unless you want to greatly simplify the problem. If you want to include all of the nuances of specific MAC and network-layer protocols, you need to use something like NS3, OMNeT++, Exata etc.
Matlab is good for phy layer modelling. There are many built-in functions. NS3, NS2 etc. are good for level 2 and level 3.
I have once wrote a network simulator for packet level simulation in Matlab. It was very slow. Then i rewrote lots of modules in C++ (compiled them into mex functions) and everything has become fast. I should have used NS2 (or something like that) from the beginning, but I had little knowledge of C++ and a great knowledege of Matlab.
You can do anything you want in Matlab, but it may run very slow. If your simulations have thousands of packets transmitted, use network simulator based on C++. Matlab is script language, not compiled language.
P.S. Matlab has no built-in functions for modelling networks on layers above phy.