user2609605
user2609605

Reputation: 628

Data conversion between java and matlab buggy?

I tried the following: I have a MATLAB class Value and want to push it onto a java stack like so

stack = java.util.Stack
a= Value % constructor of MATLAB class 
stack.push({a})

Note that I have to wrap a because passing MATLAB objects to java methods is not supported. Then I try to regain:

a1 = stack.pop

But here, a1 turns out to be array of type java.lang.Object[] but it is empty:

a1 = 

  java.lang.Object[]

    [[]]

Can anyone tell me what went on and how to get what I want. To be honest, I will now just use matlab arrays to emulate the stack, but still... I am curious.

Upvotes: 1

Views: 47

Answers (0)

Related Questions