My code is getting slower and after profiling it MUPADMEX is observed to take most of the time
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am running my code and after sometime my code becomes slower and slower. When I profiled it, it seemed to me that the function MUPADMEX is taking lots of time in executing the code here. I have attached the profiler picture![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1616283/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1616283/image.png)
Réponses (1)
Amal Raj
le 19 Fév 2024
Hey, If MUPADMEX is slowing down your MATLAB code, it's likely due to intensive symbolic computations. To optimize, consider simplifying symbolic expressions, converting them to numeric where possible, and ensuring you're using the latest MATLAB version. Profile your code to pinpoint the slow operations, and try to vectorize or batch process them. If you're working with loops, preallocate memory to avoid dynamic resizing. For repetitive calculations, cache results. If suitable, parallelize your code with MATLAB's Parallel Computing Toolbox. Lastly, check if a more efficient algorithm can be applied to your problem to reduce computational load.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!