C # How to call the dynamic link library of MATLAB ?,

Source: Internet
Author: User

C # How to call the dynamic link library of MATLAB ?,

? ? Recently, C # is used as a program to display the ECG waveform in real time. We all know that when we collect ECG, we collect not only the ECG signal, but also some 50Hz power frequency interference and Baseline Drift. Therefore, we need to apply some filters to remove these interference signals, for filters, we must have designed them using MATLAB, so I will use the C # design interface. I will use MATLAB to write the filtering algorithm (relatively simple) and then generate a dynamic link library, C # Call the dynamic link library.

? ? The following is a simple example to learn how to call a dynamic link library. I haven't started my work yet.

1. First create a. m file in MATLAB

? ? ? ? ? ? ?

Save to D: \ Program Files \ MATLAB \ rw.a \ bin.

Enter deploytool in the Command window

In the pop-up dialog box, select the third,

Select the. m function we just saved. Because we use C # To call the dynamic link library, we must select. NET Assembly.

There will be a class,

The class name here is the class name of the object to be instantiated in C. Click package

This step is slow to generate a dynamic link library.

2. Step 2? Open VS2015, create a form application, right-click the reference in the right column, add the reference, import the two in the circle, drag a button in the toolbox, and enter the statement. See the figure below.

3. Complete. Run

Subsequent makeup

 

<

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.