octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58127] save -V7 and -append error


From: Liang Tang
Subject: [Octave-bug-tracker] [bug #58127] save -V7 and -append error
Date: Tue, 7 Apr 2020 08:08:39 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Follow-up Comment #2, bug #58127 (project octave):

Thanks for the comments.  I would like to add some explanations. 

(1) The purpose is to exchange saved files from Octave or Matlab for later
re-used in both codes.  (If there is a better approach, I would appreciate
your inputs.)  
(2) Given Matlab does not read Octave default save file, to get file
compatibility between Octave and Matlab, I write the same Matlab file format
in both Octave and Matlab.  
(3) -v7 is just one of options in writing the files that can be exchangeable
between the two codes.  Other options may be possible, but I did not try.  I
need just one to work consistently.  I am using both -v7 in octave and matlab
for outputting.
(4) There are two issues I ran into.

(4.1) The file saved right below in Octave cannot be reload back in Octave
when there is no error in writing the file.  
a=1;b=1
save -V7 ab.mat a
save -append ab.mat b
load ab.mat
error: load: invalid element type = 8227 

The few lines above save and reload correctly in Matlab.  

(4.2) Compatibility.  The few lines below writes out a file can be loaded in
Octave and Matlab correctly  
a=1;b=1
b =  1
save -V7 ab.mat a
save -v7 -append ab.mat b
load ab.mat

However the same executed in Matlab, you have a warning message:
a=1;b=1
b =  1
save -V7 ab.mat a
save -v7 -append ab.mat b
Warning: Ignoring the version specified. The version flag is not required when
using the '-append' flag. 
load ab.mat

I can either suppress the warning message or follow Matlab's warning to remove
-v7 in the second save.  If I do the later, I am back to (4.1) issue.  

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58127>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]