[bug #68267] save -v4 has many inconsistencies with Matlab
Rik <[email protected]> Thu, 23 Apr 2026 04:49:43 -0400 (EDT)
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
URL:
<https://savannah.gnu.org/bugs/?68267>
Summary: save -v4 has many inconsistencies with Matlab
Group: GNU Octave
Submitter: rik5
Submitted: Thu 23 Apr 2026 10:49:37 AM CEST
Category: Octave Function
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Unlocked
Release: dev
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 23 Apr 2026 10:49:37 AM CEST By: Rik <rik5>
See this Discourse thread
https://octave.discourse.group/t/help-with-matlab-compatability-of-save-v4/7502/5
Incompatibilities noted:
1) Octave allows saving variables > 2GB
x = ones ((2^31+8) / 8, 1);
save -v4 tst2.v4 x
Matlab emits a warning and does not save the variable.
2) Octave casts unsupported variable types into double for saving
a = double (1);
b = uint8 (2);
c = char ('c');
save -v4 tst3.v4 a b c
Matlab emits a warning and does not save the *uint8* variable. The only
supported data types are *double*, *char*, *sparse double*.
3) Octave creates corrupted data files when unsupported data type is used.
a = {1};
b = double (2);
save -v4 tst4.v4 a b
warning: save: wrong type argument 'cell'
load tst4.v4
error: load: can't read binary file
Matlab emits a warning about the wrong data type, but still saves the other
variables.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68267>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaendJwAKCRCqLAuaBUf3 To9dAP9r2IZvcGvHGYfoDlj18l/gdR/nVlelo5sZV7UEhUy7fQEAk8EFKAw8R/0l zJIOja18WhbT6nOv+oEscJWts+mbvAE= =kzWJ -----END PGP SIGNATURE-----