Edit: I see now that you didn't explicitly ask about SystemModeler (I misread WSN to WSM), I just assumed since you posted this in the SystemModeler group. What is your connection to SystemModeler?
Hi,
I have never used MATLINK so I can't give you any instructions on how to use it, but there seem to be extensive documentation on their site: http://matlink.org/documentation/ and also instructions for getting started: http://matlink.org/#connecting .
They suggest you try the following piece of code:
Needs["MATLink`"]
OpenMATLAB[]
MEvaluate["mat = magic(4)"]
mat = MGet["mat"]
Try that and see if it works!
Now, for connecting Mathematica to SystemModeler there are a number of options. If the data you want to use in your simulation is static, in that it wont change during the course of the simulation, you can use:
Needs["WSMLink`"]
WSMCreateDataModel["mat", mat]
This will create a CombiTimeTable in SystemModeler with the data you just extracted from MATLAB. If you need to run the simulation in real time and transfer data from SystemModeler and Mathematica you can use the following command:
WSMLink`Simulate`SetInputs[connection, "controlVar" -> val]
You can find more information on how to use real time connectivity with SystemModeler through Mathematica in the WSMLink documentation under Advanced Simulation Control.
If you can provide an explanation on what you want to accomplish with Mathematica and SystemModeler, maybe I could give a more detailed answer!
Hope that helps you get started at least!