# How to read string arrays out of a MAT file?

**URL:** <https://discourse.julialang.org/t/how-to-read-string-arrays-out-of-a-mat-file/70234>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 22, 2021, 6:41pm UTC](https://discourse.julialang.org/t/how-to-read-string-arrays-out-of-a-mat-file/70234 "2021-10-22T18:41:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 22, 2021, 6:41pm UTC](https://discourse.julialang.org/t/how-to-read-string-arrays-out-of-a-mat-file/70234/1 "2021-10-22T18:41:55Z")

</div>

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:

```julia
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:

```julia
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"

```

Many thanks!
