MLLoadWave does not load string matrix (matlab 2018a, igor7)
Ralf Schmauder
Hallo,
I need to load a bigger matlab file into igor.
One of the objects in the *.mat file is "par_out" a 26x2 string matrix.
Using (with "instring" being the filename):
MLLoadWave /o /M=2/Y=2/S=3 instring
creates the following error:
Skipping par_out, unsupported data type (unknown type of data)
while I found a work around by using xlswrite in malab and XLLoadWave in Igor to get the data set in, its quite a hassle.
Any Ideas would be appreciated.
cheers
Ralf
If you attach a file that shows the problem, I will look into it.
December 11, 2018 at 10:31 am - Permalink
Thank you.
I just saved the problematic matrix and two content vectors.
As a work around ( so it is no longer urgent) I save now only the numbers, as both text parts do not load.
Is the first string starting with a number a problem?
best
Ralf
December 14, 2018 at 12:11 am - Permalink
Igor is calling the Matlab mxGetClassID routine. That routine returns results of type mxClassID.
For the matrix where you get "unsupported data type", mxGetClassID is returning mxUNKNOWN_CLASS. This means that the version of the Matlab DLL that you are using and that I am using does not support the class of data in that matrix.
For a normal matrix of strings, it should return mxCHAR_CLASS.
This make me think that there is something funny about how you are writing that matrix, but I don't have any idea of what it might be. Try inspecting it in Matlab and comparing it to a string matrix that Igor can load.
December 14, 2018 at 08:28 am - Permalink
Thanks a lot,
I adopted the Matlab script to write the needed information in a igor readable form.
Strangely I was pointing Igor to the same matlab directory I used in generating the mat file - Matlab's assigning data types caused me problems before, even within Matlab.
I could skip Matlab altogether if Igor could use Bioformats (https://www.openmicroscopy.org/bio-formats/) in a similar form as Matlab can (https://docs.openmicroscopy.org/bio-formats/5.7.2/users/matlab/index.ht…).
Cheers and happy holiday
Ralf
December 19, 2018 at 04:48 am - Permalink
In reply to Thanks a lot, I adopted the… by Ralf Schmauder
+1 Bioformats support would be awesome.
December 19, 2018 at 07:28 am - Permalink
I don't know much about Bioformats, but it looks like it's a Java library and I don't know that it's feasible for Igor or an XOP to use a Java library. As far as I know we don't have any expertise in Java, so even if it's possible I'm sure there would be a steep learning curve. Also, most of the formats are available only using the GPL license (which Igor and XOPs can't use) or a commercial license. I don't see pricing information for the commercial license, which probably means it's expensive :)
Maybe it's possible to call the command line tools version (https://docs.openmicroscopy.org/bio-formats/5.9.2/users/comlinetools/in…) from Igor using ExecuteScriptText?
December 19, 2018 at 08:43 am - Permalink
If you can export as HDF5, I would recommend that.
If you are not familiar with Igor's HDF5 support, execute:
December 19, 2018 at 10:12 am - Permalink