How to load microsoft access table shortcuts that is compatible with Matlab Coder
22 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.
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!
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.