"Elnaz " <email@example.com> wrote in message <firstname.lastname@example.org>... > > 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.