I am not certain what the problem is that your are experiencing.
See: Does Matlab perform well on AMD Ryzen? and related posts for some possibly relevant information.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!