Convert Matlab to C#

Posted on 2011-05-10
Last Modified: 2016-03-02
i would change a Matlab code into C#, is there any way to do that?

Question by:Suma5566
    LVL 29

    Expert Comment

    by:Paul Jackson
    There is no conversion tool available for matlab to c#, you have to rewrite from scratch unfortunately
    LVL 29

    Expert Comment

    jacko72 is right - there is no any tool to do that.

    Moreover. May be I'm missing something but your matlab code uses matlab libraries. And C# has no such libraries. How will you use your converted code? It's useless without libraries. And you will need to write your own in C#. Or am I missing something?
    LVL 15

    Accepted Solution

    Yes, there is no code converter from MATLAB to C#.

    In the latest 2011a version there is MATLAB Coder that can convert MATLAB code to C or C++, but only subset of most common MATLAB functions.
    See for more details.

    There is also MATLAB Builder NE to generate .NET and .COM components from MATLAB functions and GUI, that you can integrate into .NET applications, but it's not exactly code conversion.

    Your choice of tool (including manual rewriting) should depend on the size and complexity of your MATLAB code to be converted. And the time/money you are ready to spend.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now