I am working on some WSN simulations in NetSim. How to pass the node co-ordinates of the WSN sensor from NetSim into MATLAB in run time for MATLAB to calculate clustering ?
This can easily be passed to MATLAB in the form of parameters to a function in .m file containing your MATLAB code, as shown in MATLAB-NetSIm interfacing example available in http://tetcos.com/File_Exchange/
Add the MATLAB_Interface.c file to the project in which your are currently working on (eg DSR).
Make calls to functions in MATLAB_Interface.c at appropriate place
You can pass the parameters to the fn_netsim_matlab_run() function in the MATLAB_INTERFACING.c file from whichever file you are working on inside the current project.
From the fn_netsim_matlab_run() function you can then pass the parameters to a function in .m file containing your MATLAB code.