I am want to do something conceptually simple using MATLAB.jl package. I have a BigFloat matrix in Julia, and I want to send to Matlab to compute its inverse/determinant/eigenvalues with arbitrary-precision arithmetic (vpa) and return back to Julia.
Assuming that Matlab is already in local PATH, the following example should work:
using MATLAB using LinearAlgebra using GenericLinearAlgebra m = n = 2 a = rand(m, n) x = mxarray(a) # works OK inv(a) mat"inv($x)" det(a) mat"det($x)" eigen(a) mat"eig($x)" # NOT OK with big numbers b = big.(a) y = mxarray(b) # Maybe a better way to write it could be # mat"y = vpa($b,60)" det(b) mat"det($y)" # returns: Undefined function 'det' for input arguments of type 'cell'. eigen(b) # ? how to make it work ? mat"eig($y)" # returns a bigger message complaining about types
By the error messages I guess that MATLAB.jl convert Julia type in some data structure, and send to Matlab to be executed. Any ideas of how to handle my example with BigFloat ?