Hello,

I have a user-defined Matlab function which I want to call from Lumerical Script Editor and return its arguments to the Lumerical Script Workspace (for the future use).

Attached is the simple example function.

addsub.m (72 Bytes)

If i call that function by matlab(“addsub(20,15)”); command, i see following result in Script Prompt:

ans =

struct with fields:

```
sum: 35
sub: 5
```

But I do not know how to access these results.

On the other hand, the following code (copied) works well (what I want in my user-defined Matlab function).

matlab("

% create a logspaced vector

x_min = 1

x_max = 10

output.x = logspace(x_min,x_max,10)

");

matlabget(output);

Any help/lead would be highly appreciated.

Regards,