---
title: "Process a kinematic model with SCoRE and SARA"
canonical: "https://help.vicon.com/space/Nexus216/11608246/Process%20a%20kinematic%20model%20with%20SCoRE%20and%20SARA"
format: markdown
---
The SCoRE and SARA operations are solely joint calibrations and are not a full kinematic model. If you want to produce kinematic outputs (for example, Joint Angles), the Hip Joint locations and Knee flexion axes must be input into a secondary full kinematic model such as Plug-in Gait.

When Nexus is installed, a version of Plug-in Gait written in MATLAB is also installed. The following steps describes how to use this model to calculate Plug-in Gait variables that use SCoRE hip joint centers and SARA optimized knee axes as their foundation. You are assumed to have run through the Advanced Gait Workflow (see [Run the Advanced Gait Workflow](https://vicon-help.atlassian.net/wiki/spaces/Nexus216/pages/11614011)).

# Using Plug-in Gait Matlab with SCoRE and SARA

Plug-in Gait Matlab has been created for research purposes and to allow the incorporation of SCoRE and SARA within the modeling process.

> ⚠️ **Important**   
> ⚠️ To run PlugInGait Matlab, you need a valid MATLAB license.

To use Plug-in Gait Matlab with SCoRE and SARA, you run a static script followed by the dynamic script:

> Macro (toc)

> Macro (scroll-pagebreak)

## Process static Plug-in Gait

1. Load your static trial (created during [Step 1: Static](https://vicon-help.atlassian.net/wiki/spaces/Nexus216/pages/11614011/Run+the+Advanced+Gait+Workflow#Step1Static)).
2. Run the **AGW Process** pipeline to calculate the SCoRE hip joint centers and SARA knee flexion axes outputs for the static trial.
3. Click on the **Matlab** tab.
4. In the **Matlab script file** field, browse to *C:\Program Files\Vicon\Nexus2.#\SDK\MATLAB* and select *StaticPiG.m.*
5. In the **Script arguments** field enter the following values as a comma-separated string:
  - FirstFrame (a number)
  - LastFrame (a number)
  - MarkerSize (marker size in mm)
  - bAntTiltPos (true or false)
  - bLFootFlat (true or false)
  - bRFootFlat (true or false)
  - bHeadLevel (true or false)
  **Static example:**   
`1, 337, 14, true, true, true, true`
6. After you have entered all the required information, click **Run Script**.The log file displays the relevant feedback.
  An extra set of Model Outputs are created - **<AngleName>_M**:
7. Save the trial.

## Process dynamic Plug-in Gait

1. Load your dynamic trial (created in [Step 6: Process](https://vicon-help.atlassian.net/wiki/spaces/Nexus216/pages/11614011/Run+the+Advanced+Gait+Workflow#Step6Process)).
2. Click on the **Matlab** tab.
3. In the **Matlab script** file field, browse to *C:\Program Files\Vicon\Nexus2.#\SDK\MATLAB* and select *DynamicPiG.m*.
4. In the **Script arguments** field, enter the following values as a comma-separated string:
  - FirstFrame (a number)
  - LastFrame (a number)
  - MarkerSize (marker size in mm)
  - bAntTiltPos (true or false)
  - PelvisROG (0.31)
  - ThoraxROG (0.31)
  - ReactionFrame (a number: 0=proximal segment, 1=distal segment, 2=global frame)
  - PowerOutput (a number: 1=single value power, 3=3-component power)
  - bAllowCrossPlateStrikes (true or false, optional, default false). When this variable is set to true, Plug-in Gait combines the dynamics of foot strikes that straddle two adjacent plates.
  **Dynamic example:**   
`1, 337, 14, true, 0.31, 0.31, 1, 1`
5. After you have entered all the required information, click **Run Script**.  
The **Log** file displays all the relevant feedback.
  An extra set of **Model Outputs** is created: <AnglesName>_M, <ForcesName>_M, <ModeledMarkers>_M, <MomentsName>_M, <Plug-InGaitBonesName>_M, <PowerName>_M
6. Save the trial.