Get Started with Microsoft .NET - MATLAB & Simulink (original) (raw)
Main Content
Examples and concepts to help you quickly get started using .NET in MATLAB®
The interface to .NET allows you to bring .NET assemblies into the MATLAB environment, to construct objects from classes contained in the assemblies, and to call methods on these objects.
MATLAB supports loading these .NET assemblies:
- .NET, including .NET Core (Microsoft® Windows®, macOS, and Linux®)
- .NET Framework (Windows only)
For details, see System Requirements for Using MATLAB Interface to .NET. For information about .NET versions compatible with MATLAB, see MATLAB Interfaces to Other Languages.
To determine if your system has a supported version, use the NET.isNETSupported function.
Functions
Classes
Objects
Topics
- System Requirements for Using MATLAB Interface to .NET
Using a supported version of .NET. - Access a Simple .NET Class
This example shows how to access .NET functionality already installed on your system. - Work with Microsoft Excel Spreadsheets Using .NET
This example for Microsoft .NET Framework uses theMicrosoft.Office.Interop.Excel.ApplicationClass
class to create a spreadsheet, copy MATLAB data to it, and then close it. - Work with Microsoft Word Documents Using .NET
This example for Microsoft .NET Framework uses theMicrosoft.Office.Interop.Word.ApplicationClass
class to create a Word document. - Build a .NET Application for MATLAB Examples
Basic information for building the .NET examples included with MATLAB. - Save and Load .NET Objects in MAT Files
When you save and load .NET objects in MAT files, MATLAB usesSystem.Runtime.Serialization.DataContractSerializer
to perform the serialization and deserialization. - Simplify .NET Class Names
Use the MATLABimport
function to refer to .NET class names. - Use import in MATLAB Functions
Guidelines for using theNET.addAssembly
andimport
functions. - Use .NET Nested Classes
Using reflection to instantiate a nested class. - Handle .NET Exceptions
MATLAB catches exceptions thrown by .NET and converts them into aNET.NetException
object. - Assembly Is a Library of .NET Classes
An assembly is a collection of types and resources built to work together and form a logical unit of functionality in .NET applications. - Use .NET from MATLAB
How you can benefit from using .NET from MATLAB. - Create .NET Objects
How to create a .NET object. - .NET Terminology
Understanding namespaces and reference and value types.