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

23 views (last 30 days)
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 Comments
Matthew Flanagan
Matthew Flanagan on 3 Aug 2018
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 on 3 Aug 2018
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.

Sign in to comment.

Answers (1)

Ryan Livingston
Ryan Livingston on 16 Aug 2018
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.

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!