Can Matlab compute an integral on Mathematica via MATLink and import the result automatically?

4 views (last 30 days)
I've observed that Mathematica has far more accuracy than Matlab in computing integrals (especially double, triple or improper integrals). I wonder if it is possible to program Matlab to make such an integral on Mathematica via MATLink and to import from Mathematica the result automatically?
A script should look something like:
y=function newintegral(f,a)%where f=@(x,y) some function of two variables
y=N[Integrate[f[x,y],{x,-a,a},{y,-a,a}],50] %this is the code from Mathematica which should be combined with some MATLink code.
end
I know it seems not realistic, but how can we program models of nonlinear Partial Differential Equations in Matlab when we cannot compute accurately an integral??
Can anyone help me? I'm new to MATLink...
Or maybe there is a code in Matlab which make the same thing as NIntegrate on Mathematica...???
Thanks in advance!

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!