.NET组装集成
WithMATLAB编译器SDK™, integrating compiled MATLAB functions into a .NET application involves using a combination of APIs that initializeMATLAB运行时, load the compiled MATLAB functions intoMATLAB运行时, and manage the data that passes between the .NET code and MATLAB.
The two data conversion APIs that marshal and format data between .NET and MATLAB areMwarray
, which uses derived types that map to MATLAB data types, and the native .NET API, which uses native .NET types and supports .NET remoting. In addition, type-safe interfaces provide an alternate set of methods that work directly with native .NET data types.
要将MATLAB函数与.NET开发的服务器集成,请使用Microsoft的.NET远程API或Windows Communications Foundation框架®。这些API促进了分布式应用程序的开发,并具有用于通过网络部署活动数字并访问.NET远程功能的功能。
Functions
compiler.build.dotnetassembly |
Create .NET assembly for deployment outsideMATLAB |
编译器 |
Options for building .NET assemblies |
compiler.package.installer |
Create an installer for files generated byMATLABCompiler |
compiler.package.InstallerOptions |
Options for creatingMATLABCompiler包装安装程序 |
FromnetworkDrive的EnableSutilsutils |
Set trust setting to load .NET assemblies from network drive |
ntswrap |
Generate type-safe API |
MwarrayClass Library Reference
Topics
要求和亮点
- MATLAB编译器SDK。NET Target Requirements
Refer to the software requirements for usingMATLAB编译器SDKto create .NET Assemblies. - Common Integration Tasks and Naming Conventions
了解大多数用户执行的集成任务。 - 安装和配置MATLAB运行时
Install, configure, and uninstallMATLAB运行时。 - 设置部署的MATLAB运行时间路径
定义要运行与之生成的应用程序的机器的路径MATLAB编译器™或者MATLAB编译器SDK。
与.NET框架创建并集成
- 生成.NET组件并构建.NET应用程序
在MATLAB中创建.NET组件,并使用示例C#代码实现它。 - 将.NET组件集成到F#应用程序中
使用F#将您的汇编与更少的代码集成。
与.NET 5.0和.NET Core创建并集成
- 在Linux和MacOS上运行的构建.NET 5.0应用程序
Create a .NET 5.0 application that can run on Linux®和苹果系统系统。 - Build .NET Core Application That Runs on Linux and macOS
Create a .NET core application that can run on Linux and苹果系统系统。
示例申请
- Integrate Simple MATLAB Function Into .NET Application
使用C#或Visual Basic构建.NET应用程序®。 - 将功能与可变数量的参数集成
Build a .NET application using a MATLAB function that takes a variable number of arguments. - Assign Multiple MATLAB Functions in Component Class
Create a .NET assembly containing multiple functions to implement a matrix math program. - Integrate MATLAB Optimization Routines with Objective Functions
Build a .NET assembly that applies optimization routines to objective functions using theMWObjectArray
class. - 在.NET组装中使用多个类
Create a .NET assembly containing multiple classes to implement a signal analyzer application. - 创建数字时的块控制台显示
Handle interaction in a console-based program that creates MATLAB figures.
数据转换
- 使用Mwarray API进行数据编写
Learn how theMwarray
classes convert data between .NET and MATLAB. - Convert Data Between .NET and MATLAB
See examples on manually converting between native .NET data types and MATLAB types. - Rules for Data Conversion Between .NET and MATLAB
请参阅将.NET类型转换为MATLAB类型的规则。 - Interfaces Generated by the MATLAB Compiler SDK
学习完全不同rent class methods generated for each MATLAB function. - 在.NET应用程序中指定并行计算工具箱配置文件
Specify profile information for Parallel Computing Toolbox™ applications. - Limitations on Multiple Assemblies in Single Application
See the data types that cannot be shared across .NET assemblies.
类型安全的API
- Type-Safe Interfaces
考虑使用类型安全接口而不是Mwarray
直接与天然数据类型一起工作。 - 实现类型安全接口并集成到.NET应用程序中
Create a multiplication program that uses native .NET data types through a type-safe interface. - 创建托管的可扩展性框架插件
Extend .NET applications with Managed Extensibility Framework (MEF) plug-ins using a type-safe API.
.net远程
- Create Remotable .NET Assembly
Build a remotable .NET component using the Library Compiler app or programmatically. - Compare MWArray and Native .NET API for Remotable Assemblies
Decide between the
Mwarray
和native .NET APIs for data marshaling in an assembly. - .net远程和Windows Communications Foundation
了解实施远程功能.NET组件的优势。 - Create Windows Communications Foundation Component
Deploy a Windows®通信基金会(WCF)组件使用类型安全的API。
故障排除.NET组件
- Error Handling and Resource Management
Handle errors generated by MATLAB and manage resources explicitly. - 未能找到MATLAB运行时文件
View solutions to problems when files cannot be found. - 未能找到MATLAB课程
Solutions to problems when classes cannot be found. - Diagnostic Messages
List of diagnostic messages with suggestions about their cause.