sample Matlab COM object for C# .NET Framework application

3 views (last 30 days)
Hello everybody,
I am trying to build a Matlab COM object (encapsulated in a DLL), which I want to use in a C# .NET Framework application. Can somebody please point me to some detailed documentation, or working sample? I use Visual Studio 2019.
Thank you

Answers (1)

Christopher McCausland
Christopher McCausland on 2 Nov 2021
Hi,
The MATLAB documentation has lots of examples and documentation to get you going.
Here's a link to an example. And a second link to the top level MATLAB COM documetation which has many sublinks. That should be enough to get you going!
Let us know how it goes,
Christopher
  2 Comments
Programmer x.0
Programmer x.0 on 7 Nov 2021
Sorry, Christopher
The link you have supplied does not take me to an example of how I can generate a COM object which I can use in a C# project (Visual Studio).
The documentation describes building COM objects for the VB or C++ environments. The C# project I am using cannot load those objects.
Do you have any additional information I can use? My project is C#, Visual Studio 2019, WinForms.
The .NET assembly solution works - but it is excruciatingly slow. To instantiate your sample magic square class takes more than 2 seconds !!
Is there anything you can recommend?
Cheers
Christopher McCausland
Christopher McCausland on 7 Nov 2021
Hi,
If you are looking for a specific C# example, here is one. This is locatable from the second link in the first answer which has ALL COM documentation.
Hope this helps,
Christopher

Sign in to comment.

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!