Loading with octave the created ASCII file .mat format in Matlab

Since I'm running out of licenses, I use both Matlab and Octave, and as long as I do everything, I have no problems.

I recently started using .mat files to reduce the number of individual files.

When I do everything in Matlab, it works fine, but when I use "save" in Octave, it saves the file as ASCII, and it looks something like this at the beginning and has several matrices in it and so many headers.

# Created by Octave 3.6.4, Mon Feb 24 21:34:39 2014 CET <***@****>
# name: C
# type: matrix
# rows: 10000
# columns: 10
 79 79 79 79 79 79 79 79 79 79
 74 115 87 55 101 46 83 92 113 61
 69 142 128 48 160 45 87 113 114 71
 84 107 145 62 245 78 69 88 149 78
 120 73 148 32 299 114 57 79 137 76

This is fine, but Matlab refuses to read the file. Neither with 'load' and '-ASCII', nor with importdata. (Note: the file contains uninterpreted data ....)

Is there anything I can do? Octave only downloads files with load.

Thank!!

+4
1

Octave "-ascii" matlab v4, v6, v7

octave:1> a = rand(3, 3)
a =
   0.086093   0.541999   0.889222
   0.029643   0.633532   0.762954
   0.544787   0.150573   0.927285
octave:2> save ("-ascii", "yourfile.asc")
octave:3> save ("-v7", "yourfile.mat")

matlab do

>> b = load ('yourfile.asc')

b =

    0.0861    0.5420    0.8892
    0.0296    0.6335    0.7630
    0.5448    0.1506    0.9273

>> load ('yourfile.mat')
>> a

a =

    0.0861    0.5420    0.8892
    0.0296    0.6335    0.7630
    0.5448    0.1506    0.9273
+1

All Articles