help-octave
[Top][All Lists]
Advanced

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

Re: Matlab (.mat) files format


From: siko1056
Subject: Re: Matlab (.mat) files format
Date: Sat, 18 Nov 2017 06:45:57 -0700 (MST)

dariodematties wrote
> Hello People,
> 
> I am working in a cluster, then (at least for now) I am obliged to use
> matlab.
> When I save .mat files in octave, it is pretty easy to edit them with any
> editor you have (like vim).
> I manipulate those files with c++ programs in order to interact with
> octave
> and with its visualization capabilities, analysis tools, computations,
> etc.
> Now, using matlab I have realized that when you want to save a mat file
> and
> then you try to edit it,
> the characters in the in it are a kind of mess.
> Why is that? Compression?
> And -the most important point- How can I avoid it and save the files in a
> the way octave saves them?
> 
> I have try to save them without compression, but the option seems to be
> not
> recognized:
> 
>>> save AudioVector.mat a -v7.3 -nocompression
> Error using save
> Unknown command option.
> 
> The version of matlab available is
> 
>>> ver
> ----------------------------------------------------------------------------------------------------
> MATLAB Version: 8.6.0.267246 (R2015b)
> 
> Operating System: Linux 2.6.32-696.10.3.el6.x86_64 #1 SMP Thu Sep 21
> 12:12:50 EDT 2017 x86_64
> Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM)
> 64-Bit Server VM mixed mode
> ----------------------------------------------------------------------------------------------------
> MATLAB                                                Version 8.6        
> (R2015b)
> Curve Fitting Toolbox                                 Version 3.5.2      
> (R2015b)
> Image Processing Toolbox                              Version 9.3        
> (R2015b)
> Parallel Computing Toolbox                            Version 6.7        
> (R2015b)
> 
> Thanks!

Octave uses the `-text` flag [1] by default when calling `save`.  This
output format is not available in Matlab.  Instead  Matlab uses a binary
file output by default.

Append the `-ascii` flag [1,2] in Octave and Matlab to create textual
interchangeable .mat files.  This format is less verbose than `-text` (no
header information is included etc.) but the files remain editable.

HTH, Kai

[1] https://www.gnu.org/software/octave/doc/interpreter/XREFsave
[2] https://www.mathworks.com/help/matlab/ref/save.html#inputarg_fmt



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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