How to implement load function into MatLab Coder

조회 수: 3 (최근 30일)
Marc Laub
Marc Laub 2020년 12월 1일
답변: Ameer Hamza 2020년 12월 1일
Hey guys,
I wrote a programm in Matlab and it takes quite a long time to run through, so we wanted to know how much faster it would be when its written in C++ as soon as development is over. So I wanted to use MatLab Coder to translate my Code to C++, but in my code I use some earlier calculated results, or some databases I wrote on my own to run the code. Prior to each run I simply load them, but I dont know how I would do this when translating it with Coder...
How do I convert the structs and arrays that are stored as .mat in such a way that I could load them into a C++ code. I cant find anything about that.
Best regards
Marc

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 12월 1일
I haven't tried this myself, but this link shows that MATLAB provides C++ API to load .mat files: https://www.mathworks.com/help/matlab/matlab-c-api-to-read-mat-file-data.html
Also, if you want to dig deeper, this document provides the structure of .mat file: https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by