Hi Bryce, Sorry I am a little late in a reply haha but you would want to calculate time varying loudness with this: https://www.mathworks.com/help//audio/ref/acousticloudness.html
Then calculate the statical 90th percentile for N10. Acousticians like to do that the opposite of statisticians haha. Hope this helps you or someone else.
Troy