MAT.jl icon indicating copy to clipboard operation
MAT.jl copied to clipboard

MAT.jl can not open variables storing string arrays.

Open Leon6j opened this issue 4 years ago • 0 comments

I have two string arrays stored in a MAT file named test3.mat. They can be read out easily within Matlab, but I’m having big trouble reading them out in Julia.

Below is my code:

using MAT
F1 = matopen("test3.mat");
a = read(F1, "a");
a = read(F1, "b");
close(F1);

Here is a link to the test3.mat file: https://www.icloud.com/iclouddrive/0CtmgoektpD9oYZf2nzrN1aVQ#test3

Here is one of the string arrays that was read out of the MAT file in Matlab:

a =

20×1 string array

"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"
"HLY0802"

Leon6j avatar Oct 23 '21 01:10 Leon6j