juliamatlab / mexjulia

embedding Julia in the MATLAB process.
MIT License
52 stars 14 forks source link

Multiple outputs are a struct, maybe should be a cell-array? #48

Closed standarddeviant closed 7 years ago

standarddeviant commented 7 years ago

If you put the following in nargoutTest.jl

# nargoutTest.jl
function nargoutTest(a,b)
  @show a, b
  return "outp1", "outpTWO"
end

Then run the following in matlab

>> jl.include('nargoutTest.jl')
>> jlout = jl.call('nargoutTest',6,7)
(a, b) = (6.0, 7.0)

jlout = 

  struct with fields:

    outp1: 'outpTWO'

The resulting struct has one field, where field-name = "outp1" and field-value = "outputTWO". It seems like it should be a cell array instead of a struct. Is this intended behavior?

standarddeviant commented 7 years ago

Closing this because #49 is the actual issue. Still working on understanding the code.