MLLoadWave does not load string matrix (matlab 2018a, igor7)

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

 

 

Ralf Schmauder

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

test_180918_4.zip (1.16 KB)
hrodstein

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.

 

Ralf Schmauder

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

 

aclight

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?

hrodstein

If you can export as HDF5, I would recommend that.

If you are not familiar with Igor's HDF5 support, execute:

DisplayHelpTopic "HDF5XOP"