This TechDoc describes the steps necessary to apply the Structural Decomposition Analysis (SDA) using Matlab. The code has two stages. The first stage, which comprises PrepSDA.m and RAS_SDA.m, prepares the data and the input required for SDA based on the accounting identities defined in Miller and Blair (2009) and Jackson and Schwarm (2011). The second stage (SDA.m) carries out the analysis and estimates the results based on the mathematical procedure in Yang and Lahr (2010) and Zhang and Lahr (2014). The end results can be exported into a csv file.