MATLAB fails to read MEX file
조회 수: 7 (최근 30일)
이전 댓글 표시
In the institution I work with MATLAB there was recently a system update (debian).
After the update this isn't possible no longer. A code snippet would look like:
data=cdi_readfield(<path to file>,[],'var100');
I have tried this with MATLAB R2010b and R2013b. Both times the same error message:
??? Attempt to execute SCRIPT cdi_readfield as a function:
<some path>/matlab-cdi/cdi_readfield.m
In the matlab-cdi folder there is a cdi_readfield.m which contains only comments and the MEX file cdi_readfield.mexglx
Apparently MATLAB only "see" cdi_readfield.m and not the MEX file. Hence it fails to read the GRIB file.
So I guess it has something to do with the update of the OS.
Did somebody make a similar experience or can give a hint what could be the reason?
Thanks
댓글 수: 0
답변 (2개)
Walter Roberson
2015년 7월 17일
At the command line give the command
rehash toolboxcache
댓글 수: 2
Walter Roberson
2015년 7월 17일
The mexglx extension appears to be for 32 bit Linux. It is possible that you upgraded to 64 bit Linux, which would use mexa64 as the extension.
You should go back to the cdi directory and use the "compile" function to create a .mexa64 for use on your system.
Steven Lord
2015년 7월 17일
The extension .mexglx is the correct extension for 32-bit Linux MEX-files. As part of the OS upgrade, did you upgrade to 64-bit Linux? If so, you will need to rebuild the MEX-file (or if you don't have the source code, ask the person from whom you obtained the MEX-file to provide you with a new file.) The new MEX-file should have the extension .mexa64 as described in the documentation for MEXEXT.
댓글 수: 9
참고 항목
카테고리
Help Center 및 File Exchange에서 Reference Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!