Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty julia Dict is not readable by matlab #115

Open
bjarthur opened this issue Apr 4, 2019 · 0 comments
Open

empty julia Dict is not readable by matlab #115

bjarthur opened this issue Apr 4, 2019 · 0 comments

Comments

@bjarthur
Copy link
Member

bjarthur commented Apr 4, 2019

julia> matwrite("emptydict.mat", Dict("emptydict"=>Dict()))

results in the following in matlab:

>> load('/Users/arthurb/emptydict.mat')
Error using load
Cannot read file /Users/arthurb/emptydict.mat.

matlab does have the concept of an empty struct:

>> struct([])

ans = 

  0×0 empty struct array with no fields.

non-empty Dicts work just fine:

julia> matwrite("notemptydict.mat",Dict("notemptydict"=>Dict("a"=>1)))
>> load('/Users/arthurb/notemptydict.mat')
>> notemptydict

notemptydict = 

  struct with fields:

    a: 1
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

No branches or pull requests

1 participant