Tuesday, 8 December 2009

Simple way to pass numeric array from c# to matlab.

This is a follow up screencast on Matlab Neural Network in C# Application (http://baijumax.blogspot.com/2009/05/matlab-neural-network-in-c-application.html),users often face issues with passing array from c# to matlab and based on their feedback I have decided to prepare this
screen cast in which I have shown simple solution to get around with syntactical issues of passing numeric array from c# to matlab by using simple string array.

17 comments:

  1. Hi Baiju,

    I think by mistake u posted WPF multi threaded application webcast again.

    Regards,
    Mukul

    ReplyDelete
  2. Mukul ,

    I have updated the video.

    Cheers
    BAIJU K M

    ReplyDelete
  3. hi,

    First of all. Thanks very much for your useful post.

    I just came across your blog and wanted to drop you a note telling you how impressed I was with the information you have posted here.

    Please let me introduce you some info related to this post and I hope that it is useful for .Net community.

    There is a good C# resource site, Have alook

    http://csharptalk.com

    simi

    ReplyDelete
  4. Thanks Rahul.
    I have checked the site you have mentioned,It's a good c# sharp resource and keep up the good work .

    Cheers,
    BAIJUMAX

    ReplyDelete
  5. hi baijumax...
    i want to ask u someting....can u help me in create wireless network using high altitude platforms(HAPs)...it really important...

    ReplyDelete
  6. Hi Mischoc2,

    I have limited/no knowledge on wirless n/w domain , sorry couldn't able to help much on your query.

    Cheers
    BAIJUMAX

    ReplyDelete
  7. hi baijumax, i am a student from University Malaya, M'sia. I am given a project to which asked to produce a GUI for secant method(a numerical method to find roots of equation), we already write the code for matlab, but we just don't know how to make it in GUI. could you teach me how to do it?

    ReplyDelete
  8. Hi Darenbent,

    You can use matlab 'guide' tool to create GUI in matlab.please watch my screencast on the same to get started http://baijumax.blogspot.com/2009/05/creating-gui-applications-with-matlab.html.

    Cheers,
    BAIJU K M


    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    darenbent said...
    hi baijumax, i am a student from University Malaya, M'sia. I am given a project to which asked to produce a GUI for secant method(a numerical method to find roots of equation), we already write the code for matlab, but we just don't know how to make it in GUI. could you teach me how to do it?

    ReplyDelete
  9. is it possible,create ,train,and simulate matlab neural networks invoking there corresponding dll files within C#.net application.

    ReplyDelete
  10. This is very slow for large matrices so the comment at the end is not founded.

    To pass large matrices (like images) to matlab .net assemblies you need to build a csharp Array object, this can be defined by a simple:

    Array array = new float[1000, 1000];

    Set its values as required and then just run:

    MWArray MatLabInputImage = new MWNumericArray(array);

    Followed by:

    MatLab.myMatLabFoo(MalLabInputImage);

    ReplyDelete
  11. I really need your help :(

    My code is:

    MWNumericArray input = null;
    MWNumericArray output = null;
    MWArray[] result = null;

    Array d = new float[2, 1];

    MWArray lol = new MWNumericArray(d);

    result = obj.makesquare(lol);

    output = (MWNumericArray)result[0];
    Console.WriteLine(output);

    with a example that i just pass a int it's work but now i need to pass a vector :s

    and i got this error:


    Error 1 Cannot implicitly convert type 'MathWorks.MATLAB.NET.Arrays.MWArray' to 'MathWorks.MATLAB.NET.Arrays.MWArray[]' C:\Users\Ze\documents\visual studio 2010\Projects\testematlab\testematlab\Form1.cs 43 22 testematlab

    ReplyDelete