Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab Plotting Tools in C# Application

Tags:

c#

plot

matlab

Can anyone tell me how I can use Matlab Plotting Tools from my C# application? I am new to Matlab, so I don't know anything about the Matlab Plotting Tools. The requirement is that I have to use Matlab plotting tools to plot my data from C# application. Like embed the Matlab tools in my C# Windows Form Application Interface. Thank you for your time...

like image 499
Jin Ling Avatar asked Feb 01 '26 16:02

Jin Ling


1 Answers

Using the additional product MATLAB Builder for .NET, you can deploy your MATLAB code to a .NET assembly and call it from C#. The first link from @Marshal describes that process well.

However, it's not possible to parent a MATLAB axis to a Windows Form directly. You can either have your C# application pop up the plot in a separate MATLAB figure window, or you can save the plot off temporarily to a static image file and display that in the Windows Form.

In addition, if by "the MATLAB plotting tools", you mean not only plots themselves but the interactive tools that allow runtime manipulation of plots - these are explicitly excluded from deployment using the Builder products. See the documentation for details.

like image 125
Sam Roberts Avatar answered Feb 03 '26 04:02

Sam Roberts