Running Matlab in DWM

After installing Matlab 2024b on my void linux machine I could launch it with matlab but after the splash screen there was only a partially rendering windows that had "Ready" written at the bottom.

I solved this as follows:

I came across this solution in an Arch forum post. I did not need to set the env var the post suggests setting.