"Elnaz " <firstname.lastname@example.org> wrote in message <email@example.com>... > > My function defined in C has two outputs but when I call it from MATLAB command line it only returns the first output. > I am calling mexfunction gateway for my 3 input, 2 output function as:
> How can I get it to return the both?
[x y] = mymexfunction(a,b,c)
However, to keep from getting a seg fault and crashing MATLAB, you really should have a test for nlhs==2 in your code before you write into plhs.