-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
When loading a matrix from a json file with the loadjson function that was generated from the savejson function, it comes in as the transpose of the original rather than being identical to the original.
The following code:
%% ArrayTest
bar = magic(4);
[~] = savejson('',bar,'bar.json');
test = loadjson('bar.json');
result = all(test == bar,'all')
result = all(test == bar','all')
%% ArrayInStructTest
foo.bar = magic(4);
[~] = savejson('',foo,'foo.json');
test = loadjson('foo.json');
result = all(test.bar == foo.bar,'all')
result = all(test.bar == foo.bar','all')returns:
result = 0
result = 1
result = 0
result = 1Metadata
Metadata
Assignees
Labels
No labels