# is not recognized in matlab GUI

I would like to add a library to matlab gui. However the "#" was not recognized by the matlab. Anyone knew what's happening?

5 件のコメント

dpb
dpb 2022 年 12 月 11 日
That's C source code, not MATLAB code
You would load a DLL file, not the source...
gdz
gdz 2022 年 12 月 11 日
Sorry, I'm bad in programming...
As far as i understood, in order to used the "max6675.h" and "max6675.cpp", I have to convert them into matlab readable code, a.k.a. DLL file by using syntax loadlibrary in matlab.
Am I right? Please correct me if anything is wrong. Thank you.
dpb
dpb 2022 年 12 月 11 日
You are NOT right, no. loadlibrary loads an already-created library; it does NOT build the library from the source code.
If the DLL doesn't already exist, then it has to be created from the source code by compiling the source to build the library.
One would presume there is an available download of the library already built as well as the source from wherever you obtained it.
gdz
gdz 2022 年 12 月 12 日
Thank you for pointing out.
Actually I would like to read the temperature of a K-type thermpcouple by using a temperature module called MAX6675. The MAX6675 is connected to the Arduino and I have downloaded a MAX_6675 library from Arduino. The MAX6675 works well in Arduino, but now i would like to let the temeparature display on MATLAB GUI.
I found a similar project (https://youtu.be/vFup14vi6H4), which are integrated MAX6675 to the MATLAB simulink. However, he did not use a DLL file and the code is written in C. May I know why can he do that?
gdz
gdz 2022 年 12 月 14 日
Dear @dpb,
Am I going create two DLL files from the "max6675.h" and "max6675.cpp", or I only have to create from one of them?
Thank you.

サインインしてコメントする。

回答 (1 件)

Mann Baidi
Mann Baidi 2023 年 8 月 30 日

0 投票

Hi,
I understand that you are facing issues in importing the .h libraries and .cpp files in MATLAB. I would suggest you follow the instructions given in the following link.
Hope this helps!

カテゴリ

ヘルプ センター および File ExchangeArduino Hardware についてさらに検索

質問済み:

gdz
2022 年 12 月 11 日

回答済み:

2023 年 8 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by