How to load microsoft access table shortcuts that is compatible with Matlab Coder

33 ビュー (過去 30 日間)
Matthew Flanagan
Matthew Flanagan 2018 年 8 月 2 日
回答済み: Ryan Livingston 2018 年 8 月 16 日
I am working with a Matlab function that loads a Microsoft access table shortcut and then processes the data accordingly. When I try to use the Matlab coder to convert to C code it fails because it can't convert the load function to an equivalent in C.
So my question is, is there a workaround to open a Microsoft access table shortcut without the function load so I can use the Matlab coder?
I have looked into opening it manually with C, however I don't have access to the entire data set just the shortcut so I can't view the contents of the file and thus how to load it in C.
________________________
Debugging Info
I can generate a MEX file successfully with Matlab coder using the load function since it is supported. Attached is an output of the error message after trying to generate code. Additionally I have tried open, fopen, and coder.load. The problem with fopen is that it doesn't know how to read it properly. Open works but is not supported by Matlab Coder. As for coder.load it doesn't work when generating code either.
Thanks for any help!
  3 件のコメント
Matthew Flanagan
Matthew Flanagan 2018 年 8 月 3 日
Yes it is a Microsoft access table and not a Matlab file. Unfortunately, for my project getting another file format is not possible (I have asked).
Rik
Rik 2018 年 8 月 3 日
I'm not aware that the load function is capable of reading those. You might need to use ActiveX controls, which would massively decrease your chances of converting to C.

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

回答 (1 件)

Ryan Livingston
Ryan Livingston 2018 年 8 月 16 日
There's no explicit MATLAB Coder support for loading these types of files. Are you trying to generate MEX code to speed up your MATLAB code or do you eventually want C code to use outside of MATLAB?
For MEX, I'd suggest starting with finding a way to read those files in MATLAB first. Once that works, use the MATLAB profiler to measure your MATLAB code and focus on generating MEX for the hot spots. Then you can run your Microsoft Access code in MATLAB, and the performance critical algorithmic code in generated MEX.
For standalone code, if you can write C code to read the data from the table, you can call that C code from your MATLAB codegen code using coder.ceval to import the data.

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by