|
Hi all,
My newbie question for r2009b.
I want to build a .Net assembly so I can use it in C#
I have a Matlab class m-file caled mydll.m
classdef mydll
properties
dataout=[];
end
methods
function datao = myf1(var1, var2, var3)
datao = var1 * var2 * var3;
end
function obj = myf2(obj, var1, var2,var3)
obj.dataout = var1 * var2 ;
end
end
methods (Static)
function datas = myf3(var1, avr2, var3)
datas = var1*var2*var3;
end
end
end
I use deploy tool . file -> new -> deployment project create a project
ClassMydll.prj
Then I add a class called cmydll, then add the m-file mydll.m into it.
build the project and the dll
First I install MRC in the machine. I create a C# project. includes Mathwork dlls and ClassMydll.
Now I try to use the methods myf1, myf2, myf3
using ClassMydll;
//I am expecting that I can use them like this:
void function foo()
{
ClassMydll.cmydll test = new ClassMydll.cmydll();
MWArray v1 = 1;
MWArray v2 = 2;
MWArray v3 = 3;
MWArray d1 = test.myf1(v1,v2,v3);
ClassMydll.cmydll t2 = test.myf2(v1,v2,v3);
MWArray d2 = ClassMydll.cmydll.myf3(v1,v2,v3);
}
But I can not see the methods from C#. The only one is the class constructor mydll
What is wrong?
For early version, I was able to see the methods.
Thanks
|