JuliaInterop / MATLAB.jl

Calling MATLAB in Julia through MATLAB Engine
MIT License
269 stars 63 forks source link

Sparse complex matrices convert to sparse real matrices #179

Closed vsaase closed 3 years ago

vsaase commented 3 years ago

Hi, trying this: mat"$x=sparse([i])"

I expect the result to be complex, but

julia> x
1×1 SparseMatrixCSC{Float64,Int64} with 1 stored entry:
  [1, 1]  =  0.0

However:

julia> is_sparse(get_mvariable(:x))
true

julia> is_complex(get_mvariable(:x))
true

Matlab R2020b Julia 1.5.3