libmx.dll and libmat.dll cannot be found in Igor Pro9
Ryosuke Kurihara
Hello,
I have been trying to load MATLAB binary in Igor Pro 9.00 64-bit (my PC: win 10, 64-bit).
MATLAB R2021b (64-bit) has been installed in my PC.
I have problem when I try "Laod Matlab MAT File" and "Find 64-bit Matlab Libraries".
From the pop up window titled "Pick a folder", I selected the directory where "libmat.dll" and "libmx.dll" existed.
However, Igor showed following message:
The path does not contain valid instances of libmat.dll or libmx.dll."
while both files existed in there.
Any Ideas would be appreciated.
Hope that helps,
Ryosuke Kurihara
We recently discovered that this is due to a DLL conflict between Matlab and Igor Pro 9. They use different versions of the same DLL which causes the Matlab library to fail to load. We have no solution for this.
If you have an activation key for Igor Pro 8, one option is to keep both Igor Pro 8 and Igor Pro 9 on your machine and use Igor Pro 8 for loading Matlab files.
If your Matlab files are Matlab version 7.3 you can load them as HDF5 files. Here is a discussion of that which I added to the Igor Pro 9 help files to be shipped with the next release (9.01):
Loading Version 7.3 MAT Files as HDF5 Files
In 2006 Matlab added version 7.3 of their MAT file format. A version 7.3 MAT file is an HDF5 file with 512 bytes of Matlab-specific information at the start of the file. The HDF5 library allows applications to prepend application-specific data, so version 7.3 MAT files can be loaded as HDF5 files.
You may find it useful to load such files as HDF5 files because Igor has better HDF5 support than MAT-file support, because you don't have Matlab on your machine, or because Igor's Matlab support does not work with your Matlab installation.
A version 7.3 MAT file contains an HDF5 signature at byte offset 512. The HDF5 signature is an 8-byte pattern described at <https://support.hdfgroup.org/HDF5/doc/H5.format.html>;.
To open a 7.3 MAT file, create an HDF5 Browser window by choosing Data->Load Waves->New HDF5 Browser. Click the Open HDF5 File button and select All Files from the popup menu in the HDF5 Browser Open File dialog. If you try to open a MAT file that is not version 7.3 as an HDF5 file, the HDF5 library will return an error.
For an example of saving Matlab data in the version 7.3 format, see <https://www.mathworks.com/help/matlab/ref/save.html>;. You can also set a preference in Matlab to make version 7.3 your default format.
January 19, 2022 at 04:04 am - Permalink
In reply to We recently discovered that… by hrodstein
Dear hrodstein
Thank you very much for your comments!
I can use MAT files in Igor Pro 8.
June 9, 2022 at 01:52 am - Permalink
If you can install the older version of Matlab. you can also "load .mat file" directly with igor9.
On my PC, I have installed the Matlab 2010a basic without the extensive toolbox, and it does not need to be activated for the licence.
June 12, 2023 at 12:05 am - Permalink