Skip to content

Issue with function arguments #161

Closed
@henry2004y

Description

@henry2004y

I have encountered an issue using boundary function from Matlab.

using MATLAB
x = rand(30);
y = rand(30);
k = mxcall(:boundary, 2, x, y) # This works fine
k = mxcall(:boundary, 3, x, y, 1.0) # This would return error

The error messages are:

Error using boundary (line 54)
Too many output arguments.
 
Error using save
Variable 'jx_boundary_arg_out_1' not found.
 
ERROR: MATLAB.MEngineError("failed to get variable jx_boundary_arg_out_1 from MATLAB session")
Stacktrace:
 [1] get_mvariable(::MSession, ::Symbol) at /Users/hyzhou/.julia/packages/MATLAB/cVrxc/src/engine.jl:164
 [2] mxcall(::MSession, ::Symbol, ::Int64, ::Array{Float64,1}, ::Vararg{Any,N} where N) at /Users/hyzhou/.julia/packages/MATLAB/cVrxc/src/engine.jl:297
 [3] mxcall(::Symbol, ::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Vararg{Any,N} where N) at /Users/hyzhou/.julia/packages/MATLAB/cVrxc/src/engine.jl:317
 [4] top-level scope at none:0

My feeling is that the boundary function accepts different sets of input arguments which confuses Julia. How can we solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions