Questions tagged [mat-file]

Use with questions about .mat files. These files are used for storing MATLAB variables.

MAT-file is binary file format, used to store data in multiple variables or structures in MATLAB. These files use the .mat extension, and can be accessed in using the load, save or matfile functions. For more information, see MAT-File Versions in the MATLAB documentation.

MAT-files can be also created and read by other programming languages such as Python etc.

Refer to this PDF document for a description of the internals of the MAT-file format (Level 4 and Level 5).

218 questions
0
votes
3 answers

matlab out of memory ultimate solution

I have a really large file, around 10GB. I can't load it to the memory, so I managed to transfer it to .mat file. But 'out of memory' problem still comes up when I tried clustering. The ultimate solution to it I think is put those memory thing to…
Tengerye
  • 1,796
  • 1
  • 23
  • 46
0
votes
0 answers

Unable to open .fig file

I am using MATLAB 6.5 release and after downloading some free online MATLAB source code - I am unable to open .fig files. .m files open up perfectly and execute properly. I am using MATLAB 6.5 version. Screen attached. I am assuming that these .fig…
Programmer
  • 8,303
  • 23
  • 78
  • 162
0
votes
1 answer

Matio performance

I am trying to read MNIST data-set (size is 784*60000) my implementation of reading MNIST binary format takes around 20 secs, but I tried to use Matio library to read same data-set in .mat format and it takes much longer about 4~5 min. this is how I…
HadiRj
  • 1,015
  • 3
  • 21
  • 41
0
votes
0 answers

Load matrix matlab format with armadillo library problems

I've some problem if I try to load a matrix.mat <224x2 double> with Armadillo library: mat A; A.load("matrix.mat"); cout << " " << A.n_rows << " " << A.n_cols << "\n"; It prints: 5623 1 Can you tell me why?
0
votes
1 answer

EXCEPTION_ACCESS_VIOLATION when using large array in C

this is another issue I'm stuck with. First of all I'm trying to read a level-4 matlab file which contains information exported from PicoScope 6, it reads four arrays from the file, A, Tstart, Tinterval and Length. Array number one is the largest by…
Linus
  • 1,516
  • 17
  • 35
0
votes
1 answer

Eclipse C/C++: external library matio "undefined reference to 'Mat_Open'"

I started experimenting with C/C++ the other day because I needed it for reading level-4 MAT-files without needing to purchase the Matlab editor or compiler. So I found just the library that I needed but I'm not familiar with C or C++ at all so I'm…
Linus
  • 1,516
  • 17
  • 35
0
votes
1 answer

Writing .mat files to .nc

I have a code that creates a bunch of .mat files, but I want to save them as netcdf files (csv or txt would be fine as well) so people who can't use MATLAB can access them. This is what I have so far %% Use function to read in data =…
SugaKookie
  • 780
  • 2
  • 17
  • 41
0
votes
1 answer

Load part of matfile error: 'VARName' does not exist

i'm trying to load part of array in a matfile like is showed in http://www.mathworks.com/help/matlab/ref/matfile.html however, when i use loadedData = matObj.varName(indices) i keep getting: 'varName' does not exist someone knows what's rong?
Findios
  • 307
  • 1
  • 4
  • 14
0
votes
1 answer

extracting data from .mat file

I have a .mat file which contains 4 variables. Each variable (A,B,C,D) is a cell which reads <59145x1 double>. I know that there are 59145x1 arrays in each variable but do not know how to access them, and all i can see the this one cell in…
mallow
  • 83
  • 2
  • 4
  • 9
0
votes
2 answers

Open .mat file in matlab or unix - new user

I am going through someone's data analysis files (created in an older version of matlab) and trying to find out what a particular .mat file is that was used in a matlab script. I am trying to load a .mat file in matlab. I want to see what is in…
0
votes
1 answer

easily accessing data in matlab matrices loaded with scipy

When I load in a .mat file with scipy.io.loadmat, I get a data structure which is difficult to deal with because I have to guess at what level in the structure the data is contained. The numpy or scipy representation wraps everything in deep lists.…
anonymous
  • 193
  • 2
  • 5
0
votes
1 answer

Why doesn't Octave's 'save' function support single precision for MAT-files

I have Octave 3.2-4 on Ubuntu 11.10. This is the officially supported version for Ubuntu. Where it seems that GNU Octave's save function does not support binary data saving in single precision float format in MAT-files. For instance: octave:119> p_t…
fsheikh
  • 416
  • 3
  • 12
0
votes
1 answer

Loading filename stored in string and then plotting data

I am attempting to create a script which asks the user for the filename of a txt file whose contents will later be plotted. filename = input('What is the filename (without the extension) e.g. RCP6: ','s'); if isempty(filename) …
0
votes
2 answers

Loop through a series of .mat files in MATLAB

I have 12 mat files (one for each month) that need to be used individually for a calculation. They are too big to load all twelve at one time. There fore I would like to call month #1, do the calculation, call month #2, ...#12. I have done this with…
0
votes
1 answer

Loop for loading and saving .mat files

I have a folder with .mat files, and I want to write a loop for loading these files and doing some actions with data: 1) Choose my folder of data files 2) Perform the following set of operations (pseudocode): for i = 1:99 load 'Data0i.mat'…
myname
  • 137
  • 1
  • 7
1 2 3
14
15