Pergunta

I am familiar with Matlab and would like to use what I know to add the functionality I am looking for in my iOS application. The title really says it all, I would like my app to be able to use the mathematics capabilities that matlab provides like integrals, derivatives, cross products, etc. not any graphing or any of that but just basic equation solving things. Is there a way to add this functionality to it while keeping my application agile. I have heard of the matlab coder that allow code to be switched from matlab to c or c++ that could be used for an Xcode project. If this is the best solution, is that a very difficult coder to work with? This is my first application, I have literally been working with Xcode and objective-c for a few weeks but I have the basic framework of my application good to go. I need this to add the real functionality to it and make it very useable. Please go easy on me if any of my questions seem obvious, I'm a nube, I really appreciate your answers.

Josh

Foi útil?

Solução

As you mentioned, MATLAB Coder can generate C code from your MATLAB function. The header (.h) and source (.c) files can be plugged into your XCode project. The key part of the work is to decide what the input and output of the function should be and how to interface the rest of the XCode project with the Coder-generated function. Also, existing MATLAB code may not be completely compatible with the Coder, so that some modifications to your MATLAB code may be necessary. The Coder has interactive processes that guide you through this process.

If you haven't done so yet, you should start by looking at some examples of MATLAB Coder provided by MathWorks, e.g.,

http://www.mathworks.com/help/coder/examples/c-code-generation-for-a-matlab-kalman-filtering-algorithm.html?prodcode=ME&language=en

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top