Thread: How do I convert from Matlab to C++

  1. #1
    Registered User
    Join Date
    Dec 2011
    Location
    UK
    Posts
    4

    Unhappy How do I convert from Matlab to C++

    Hello everyone...I'm having a bit of a fix here. How do I convert a matlab source code to C++?? Any ideas?? My code is attached. Thx&&
    Attached Files Attached Files
    Last edited by Daive; 12-10-2011 at 03:55 PM.

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    24
    Learn C++ and it should be a simple matter. I don't think there exists any tool that converts MatLab code to C++, partly because it would depend much on the way the code is supposed to be implemented. But I may be wrong.

    I also know that there exist many C++ linear algebra libraries (which you will probably need if your original code is written in MatLab) for doing vector and matrix operations, calculating properties such as the norm and extraction of eigenvalues, libraries that support lazy evaluation, etc. Armadillo seems (according themselves) to be one of the fastest on doing basic matrix operations.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    +1 for learning C++.

    But if you thought you could just drop your assignment and expect a complete answer, you're in the wrong place.
    Instead, go here -> vWorker.com: How work gets done. Guaranteed!
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Dec 2011
    Location
    UK
    Posts
    4
    Thanks for your comments.... seems I just have to work on it manually. You know C++ is more complicated

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Matlab help
    By cyberfish in forum Tech Board
    Replies: 1
    Last Post: 03-07-2011, 06:53 AM
  2. Matlab Help
    By anirban in forum Tech Board
    Replies: 1
    Last Post: 09-02-2010, 05:00 AM
  3. Convert Matlab Algebraic Sol to C compatible
    By Takeshi in forum C Programming
    Replies: 3
    Last Post: 01-08-2009, 06:35 PM
  4. Matlab vs. R
    By ch147 in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 11-14-2007, 11:57 AM
  5. C/C++ and Matlab?
    By darkwalk in forum C++ Programming
    Replies: 2
    Last Post: 10-21-2006, 03:00 AM