Subject: Using MATLAB with Polhemus Trackers
Method 1: Use a MATLAB .m script
Polhemus has a small set of PDI_MATLAB_Samples .m scripts that demonstrate collection of P&O from any Polhemus Tracker (Liberty/Patriot/FasTrak/G4) over a TCP/IP socket.
Please be advised that Polhemus are not MATLAB experts and we provide these scripts for experimental purposes only as a courtesy to our customers without warranty or guarantee.
How the PDI_MATLAB_Samples work
To use the scripts, you must have the PDI developer kit version 4.2.0 or later installed. Run one of the sample programs in the PDI (or build your own program). The samples are pre-compiled so you do not actually need software development tools to build and run them. Use the sample program to redirect P&O to a server TCP/IP socket. Then, in the provided .m script, collect P&O from a client TCP/IP socket using a Java sockets class.
The scripts include a detailed README.txt file that explains how to do this step-by-step.
Download the PDI_MATLAB_Samples here:
Download PDI version 4.2.0 or later here:
The PDI installer file is called PISDKSetup-SWD-PS08-...exe
Method 2: Create a MATLAB mex function
An alternate method of getting tracker data into MATLAB is to create a MATLAB mex function that interfaces directly to the tracker using the PDI. We have not done this ourselves so we have very little insight to offer about how it is done. We are aware of at least one customer that is doing this successfully. To do this, you also need the PDI installed, and you can acquire it from the Host Software CD that accompanies your tracker or from the ftp link above.