Nexus MATLAB Integration

It is now simple to read data into MATLAB without having to export and import CSVs. Nexus MATLAB integration allows MATLAB to access the open trial and import any of the data directly – trajectory, device, metadata or other. This allows you to build MATLAB functions into your processing pipeline, opening a world of more powerful processing and data organisation.

Setup

  1. Check you have the latest version of Nexus installed (https://www.vicon.com/software/nexus/)
  2. Add the Nexus SDK folder (with subfolders) to the MATLAB path, default location example:

C:\Program Files (x86)\Vicon\Nexus2.11\SDK\Matlab
Nexus must be running and have a trial open to read data across. The command to open the portal between Nexus and MATLAB is

vicon = ViconNexus();

Example:

vicon = ViconNexus();
% Trial Data
Subject = vicon.GetSubjectNames()
Rate = vicon.GetFrameRate()
[Mass,~] = vicon.GetSubjectParam(Subject{1},'Bodymass') % Read in any parameter
[Path,Name] = vicon.GetTrialName()
% Model Outputs
Model_Outputs_List = vicon.GetModelOutputNames(Subject{1});
for i = 1:length(Model_Outputs_List)
r = Model_Outputs_List{1,i};
Model_Outputs_Data.(r) = vicon.GetModelOutput(Subject{1}, Model_Outputs_List{1,i});
End

Some sample scripts are available in the Nexus SDK folder (e.g. C:\Program Files (x86)\Vicon\Nexus2.11\SDK\Matlab\Examples), and another is available HERE

Support

Leave a Reply

8 + eleven =