MATLAB Would matlab be faster than Mathematica for this?

AI Thread Summary
The discussion centers on the challenges faced when optimizing a complex non-linear function using Mathematica, specifically a multivariate normal probability density function (pdf) with more than ten dimensions and a nonlinear covariance matrix. The user experiences significant computation time and crashes when defining this function, leading to questions about whether switching to Matlab would yield better performance. Responses indicate that the performance issues may not solely be due to Mathematica's speed, as both software packages could struggle with such complexity. The importance of system specifications, including RAM, processor, and operating system, is highlighted, suggesting that hardware limitations may also contribute to the slow performance. Ultimately, the effectiveness of Matlab over Mathematica for this specific task remains uncertain without further details on the user's computing environment.
jimmy1
Messages
60
Reaction score
0
I have an optimization problem which I cannot seem to solve in Mathematica as the computation time takes too long, and I'm wondering whether things would improve if I performed the same task on a program such as Matlab?

The task is to find the maximum of a non-linear function (the function is an n dimensional multivariate normal pdf, with n >10, and the elements of the covariance matrix are also nonlinear functions).
Now the problem is, even when I try to define this function in mathematica (using the MultinormalDistribution[...] function), the mathematica kernel seems to crash! I just can't seem to define any complicated mulinormal pdfs in mathematica. The computation time takes forever! After hours of waiting still no results produced!

So my question is, is this because mathematica is just a slow program or is my function too complicated for any program? Is it worth purchasing Matlab to do this instead? Will it be any faster?
 
Physics news on Phys.org
jimmy1 said:
So my question is, is this because mathematica is just a slow program or is my function too complicated for any program? Is it worth purchasing Matlab to do this instead? Will it be any faster?
This cannot be concluded unless we know what computer you are using (that is, your RAM, processor, OS, etc.) I haven't heard that Mathematica is slow compared to Matlab, so there are chances that the complexity of your program will make it run slow in Matlab too.
 
Back
Top