matlab-deployment

Matlab Coder vs hand coding?

主宰稳场 提交于 2019-11-28 05:15:01
Some background for people reading this in the future (in case it's not locked). I tend to do my programming in a high level language to understand the problem first. After covering all possible corner cases I proceed to translating the code to C++ (or C). Most of the code I write has maths in it and so MATLAB is the language I use (the alternative for me is Python). Anyway, I then translate the code from MATLAB to C++ by hand. Does anyone know if there is any advantage/disadvantage in using MATLAB Coder? It's a new product and very expensive but apart from the time it saves in translation is

Creating a graph or a plot from a C# console app, using Matlab?

亡梦爱人 提交于 2019-11-27 20:54:45
If I have a two dimensional array in C#, how would I plot the contents of this array in Matlab, as a 2-D graph? I'm after an extension method, i.e. my2DArray.PlotInMatlab(); Gravitas I got this working well in the end. Here is a sample graph, generated by a .NET 4.0 C# console app that calls a Matlab .m file: The nice thing is that we can use all the power of Matlab for drawing graphs, with only a few lines of .NET. How to do this in .NET: Create a new .NET console app for C# in Visual Studio 2010, and change it to .NET 4.0 (right click on the project, select "Properties"). .NET Main(): using

Calling a MATLAB function from C#

∥☆過路亽.° 提交于 2019-11-27 19:31:29
I developed a MATLAB function, and I'm looking for a way to call that function from another C# application and pass some parameters to it and get the results in the C# program. I heard that I can use Dynamic Data Exchange (DDE) or COM objects, but have can I do it? Lukas Kabrt There is nice example in the MATLAB Central . It shows three ways on how to communicate with MATLAB : COM MATLAB .NET Bulider MATLAB compiler COM (I do not have any experience with it) Cons: MATLAB is required to be installed on the target computer. MATLAB .NET builder compiles your MATLAB code to the .NET assembly and

What's the “right” way to organize GUI code?

倖福魔咒の 提交于 2019-11-27 10:32:21
I'm working on a fairly sophisticated GUI program to be deployed with MATLAB Compiler. (There are good reasons MATLAB is being used to build this GUI, that is not the point of this question. I realize GUI-building is not a strong suit for this language.) There are quite a few ways to share data between functions in a GUI, or even pass data between GUIs within an application: setappdata/getappdata/_____appdata - associate arbitrary data to a handle guidata - typically used with GUIDE; "store[s] or retrieve[s] GUI data" to a structure of handles Apply a set/get operation to the UserData property

MATLAB Compiler vs MATLAB Coder

£可爱£侵袭症+ 提交于 2019-11-27 06:40:17
What's the difference between the two? As far as I understand it, MATLAB Compiler wraps the MATLAB code into a .exe file so that it can be used without installing MATLAB, and only requires the MCR. On top of it MATLAB Builder NE can also be used to produce .Net assemblies to be used with .Net framework instead of the .exe file, but they still require MCR. Now I don't understand what MATLAB Coder used for? It generates C/C++ code. But is the MATLAB code really converted into C/C++, or is it merely packaged like in the case of MATLAB Compiler? Does it also need the MCR to run? I understand that

Creating a graph or a plot from a C# console app, using Matlab?

微笑、不失礼 提交于 2019-11-27 04:28:43
问题 If I have a two dimensional array in C#, how would I plot the contents of this array in Matlab, as a 2-D graph? I'm after an extension method, i.e. my2DArray.PlotInMatlab(); 回答1: I got this working well in the end. Here is a sample graph, generated by a .NET 4.0 C# console app that calls a Matlab .m file: The nice thing is that we can use all the power of Matlab for drawing graphs, with only a few lines of .NET. How to do this in .NET: Create a new .NET console app for C# in Visual Studio

Interoperating between Matlab and C#

半城伤御伤魂 提交于 2019-11-27 04:14:42
After peeking around the internet it looks like it is possible to interop between C# and Matlab. I am wondering if anyone has had success with it and what they did to do so. If possible somehow pulling it off without the use of COM. Thanks for your time. Yes, quite possible. Though I ended up using the C interface and calling into that using a mixed-mode DLL (and getting C# to call into that... but that was because I was also interfacing with some other C code). It's quite straightforward. On computers where you want to run your program, you'll need to install Matlab Runtime MCRInstaller.exe.

How to run Matlab code on an Android device?

限于喜欢 提交于 2019-11-27 02:22:01
问题 I would like to run Matlab code on an Android device. There is the JAVA Builder in Matlab, which can create Java classes from the M-Files. But it requires a MatlabRunTime to be installed on the target machine. I use Matlab on Windows, so the JAVA Builder creates a MatlabRunTime as *. Is there a way to run M-Files on an Android Smartphone? 回答1: It's not possible to use any of the deployment products (including MATLAB Compiler and MATLAB Builder for Java) to run MATLAB code on Android. The

Matlab Coder vs hand coding?

喜夏-厌秋 提交于 2019-11-27 00:41:40
问题 Some background for people reading this in the future (in case it's not locked). I tend to do my programming in a high level language to understand the problem first. After covering all possible corner cases I proceed to translating the code to C++ (or C). Most of the code I write has maths in it and so MATLAB is the language I use (the alternative for me is Python). Anyway, I then translate the code from MATLAB to C++ by hand. Does anyone know if there is any advantage/disadvantage in using

Calling a MATLAB function from C#

守給你的承諾、 提交于 2019-11-26 22:48:43
问题 I developed a MATLAB function, and I'm looking for a way to call that function from another C# application and pass some parameters to it and get the results in the C# program. I heard that I can use Dynamic Data Exchange (DDE) or COM objects, but have can I do it? 回答1: There is nice example in the MATLAB Central. It shows three ways on how to communicate with MATLAB: COM MATLAB .NET Bulider MATLAB compiler COM (I do not have any experience with it) Cons: MATLAB is required to be installed on