Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: C# calling method question
Date: Wed, 4 Nov 2009 22:10:20 +0000 (UTC)
Organization: NASA Marshall Space Flight Ctr
Lines: 65
Message-ID: <hcsu4c$mrb$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257372620 23403 172.30.248.35 (4 Nov 2009 22:10:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 22:10:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1387395
Xref: news.mathworks.com comp.soft-sys.matlab:582541


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