Reputation: 3041
My main goal is to integrate a code written in matlab(.m) with another c# application. I have considered 2 options:
So far, I am trying to make a "proof of concept" of option 2), but with no success. I don't even know how to start my question; I will improve my question as soon I get to know the toolboxes a little bit more. Please inform me if the question does not meet the standards.
Upvotes: 1
Views: 1308
Reputation: 9696
Referring to 6):
The entry point would be the same as it is in MATLAB - hence, the first function defined in the m-file. Command-line arguments will all be passed as strings to this function.
Upvotes: 2
Reputation: 13876
MATLAB Coder is a relatively new product that allows you to generate C code from MATLAB, without having Simulink. Before that, you needed Simulink and Real-Time Workshop (even if you were not using Simulink) to generate C code from MATLAB using emlc
. When MATLAB Coder was released, Real-Time Workshop was renamed to Simulink Coder, and Real-Time Workshop Embedded Coder to Embedded Coder. The difference between MATLAB/Simulink Coder and Embedded Coder is that the "basic" coder products allow to generate functionally correct code, but that code is not optimised for real-time performance or customisable to meet certain coding standards. Embedded Coder allows you to optimise and customise the code generate by MATLAB and Simulink Coder. If you had a license for RTW, then you would have been given a free license of MATLAB Coder when it was release as MATLAB Coder is a pre-requisite for Simulink Coder.
I believe emlc
belongs to MATLAB Coder. The code generated by MATLAB Coder can be imported and compiled in Visual Studio. I don't know how easy it actually is, but there is a functionality called "Pack N Go" supposed to make this process easier, check it out. There is also a Visual Studio target, but not sure whether this is in base MATLAB Coder or whether you also need Embedded Coder.
Upvotes: 3