E
eric_jin
i called function show() in a c# webservice
//show.m
function ans=show(x)
ans=x;
it works;
but when i try to call add(),it breaks;
//add.m
function ans=add(a,b)
ans=a+b;
code in c# as follows:
[WebMethod]
public int show()
{
mat.matClass st=new mat.matClass();
object obj=new object();
st.show(1,ref obj,4);
return (int)obj;
}
this returns 4;
but the following:
[WebMethod]
public int add()
{
mat.matClass st=new mat.matClass();
object obj=new object();
st.add(1,ref obj,4,5);
return (int)obj;
}
this breaks down.
could anyone please help me with it?
thanks!
P.S
while debugging i learn that this program breaks at line:
st.add(1,ref obj,4,5);
which means the function wrttin in matlab wasn't correctly called;
//show.m
function ans=show(x)
ans=x;
it works;
but when i try to call add(),it breaks;
//add.m
function ans=add(a,b)
ans=a+b;
code in c# as follows:
[WebMethod]
public int show()
{
mat.matClass st=new mat.matClass();
object obj=new object();
st.show(1,ref obj,4);
return (int)obj;
}
this returns 4;
but the following:
[WebMethod]
public int add()
{
mat.matClass st=new mat.matClass();
object obj=new object();
st.add(1,ref obj,4,5);
return (int)obj;
}
this breaks down.
could anyone please help me with it?
thanks!
P.S
while debugging i learn that this program breaks at line:
st.add(1,ref obj,4,5);
which means the function wrttin in matlab wasn't correctly called;