Skip to content

Conversation

@matthijscox
Copy link
Member

I'm trying to address all the char/string array issues. Have been able to fix the v7.3 (HDF5) versions at least.
The binary version (v6, v7) still eludes me. Opening the PR to hopefully get some feedback/collaboration.

This attempts to address: #180 #143 #33

@foreverallama
Copy link
Contributor

I think we can also add #176 here, looks like we currently do not support anything greater than 2D in v5 at least. I'll try and take a look later today.

This might also be a good time to decide if/how we want separate types for char and string moving forward to facilitate writing MATLAB char vs string arrays

@matthijscox
Copy link
Member Author

matthijscox commented Dec 10, 2025

Yeah the difference between char array and string is annoying. high-dimensional char arrays are weird anyway.

Currently a 3-D char array becomes a 2-D String matrix (v7.3), where the 2nd dimension is converted into the strings.

I guess we could decide to only support: String (1xN char matrix) and Vector{String} (MxN char matrix) and Array{Char} otherwise. Or perhaps only String and Array{Char} for simplicity? (note then we will still support reading Vector{String} via the Matlab string class)

@foreverallama
Copy link
Contributor

I don't know user preferences in Julia, so I'll refrain from commenting. Don't think its easy to get any significant opinions from end users as well is there?

I'm seeing the MATLAB string type natively in datatypes like timeseries and timetable. So if we end up supporting write for those datatypes, only then we'll need a clear differentiation between chars and strings. Otherwise its a user preference issue, rather than compatibility.

@matthijscox
Copy link
Member Author

Personally I think the N-D char arrays are a niche MATLAB thing, I think very few people care about them, so it shouldn't matter too much. Being able to load them at all is the main priority I would say. However, we can take a moment to choose a good default now.

@foreverallama
Copy link
Contributor

Vector{String} (MxN char matrix) and Array{Char} otherwise

I agree, this sounds good for char then. What are the possibilities for MATLAB strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants