I found the answer in the link that Karim posted:
It was posted by Ryan Gray, and I quote:
Another possibility is that due to corporate configuration, the AppData folder gets stored on a network share, and MATLAB stores its preferences folder there by default. This can make it very slow to unusable. You will have to set the MATLAB_PREFDIR environment variable to point to a local folder. If your IT is very restrictive, you may only be able to locally write in C:\Users\%USERNAME%, so make a folder there. Just remember that the contents are particular to each MATLAB version. These day, it seems common to have the Documents folder on a network redirect as well, so you might have to consider changing your userpath to something local as well. I would also check that TMP and TEMP folders are local rather than on a network path.
This was indeed the issue. Specifically, I had to make an MATLAB_PREFDIR environment variable that pointed to a location on my C:\ drive.