Would matlab be faster than Mathematica for this?

  • Context: MATLAB 
  • Thread starter Thread starter jimmy1
  • Start date Start date
  • Tags Tags
    Mathematica Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
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.