It seems the function in the DLL is at least called. But of course if the function expects 3 Parameters the call
a.sumab(2,5);
will produce an error. Usually in matlab if you want a return value from a function you call it
s = a.sumab(2, 5);
since matlab doesnt have reference parameters.
I think you should rewrite your Matlab function so that it only excepts 2 parameters and of course returns the result sum.
See for example:
http://thinkmetric.com/tuts/matlab/functions.html[
^]
But then again why even use Matlab for such a simple task...