Questions tagged [matlab-load]

This tag refers to Matlab's `load` command for loading data from mat-files. DO NOT USE LOAD TAG FOR THESE QUESTIONS.

Matlab uses a special format to store data to files on disk.
The load command is used to read previously stored mat-files to memory for further processing.

Do not confuse this tag with (which is used for CPU load related questions).

65 questions
9
votes
4 answers

Matlab: loading a .mat file, why is it a struct? can I just have the stored vars loaded into memory?

Relevant code: function result = loadStructFromFile(fileName, environmentName) result = load(fileName, environmentName); bigMatrix = loadStructFromFile('values.mat','bigMatrix'); But when I look in the workspace, it shows 'bigMatrix' as a…
NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352
9
votes
1 answer

How can I move variables into and out of a structure akin to LOAD and SAVE in MATLAB?

Is there a quick way (i.e. one line) to dump a collection of variables "in" a structure, using the variable names as the structure fields? The "load" function basically does this but saving and loading to a temporary file seems ugly. For…
mathtick
  • 6,487
  • 13
  • 56
  • 101
9
votes
2 answers

MATLAB - load file whose filename is stored in a string

I am using MATLAB to process data from files. I am writing a program that takes input from the user and then locates the particular files in the directory graphing them. Files are named: {name}U{rate} {name} is a string representing the name of…
Mark
  • 7,306
  • 8
  • 45
  • 87
6
votes
2 answers

Long data load time in Matlab

I have four variables, each saved in 365 mat-files (size: 8 x 92 x 240). I try to load these into my function in a for-loop day=1:365, one variable file per day. However, the two first variables always take abnormally long time to load. My code for…
LaWa
  • 183
  • 7
5
votes
2 answers

R: Help reading a particular .mat file into R

So I've been trying to read this particular .mat file into R. I don't know too much about matlab, but I know enough that the R.matlab package can only read uncompressed data into R, and to save it as uncompressed I need to save it as such in matlab…
JoshDG
  • 3,871
  • 10
  • 51
  • 85
4
votes
2 answers

Why can't Matlab R2010 load neural network objects from R2007?

I have a Neural Network that I've save to a .mat file in Matlab 2007. I'm trying to load the neural network from the file with load filename.mat. This worked great with versions R2007b and R2008, but when I try to load in R2010b I get the following…
4
votes
3 answers

Efficient disk access of large number of small .mat files containing objects

I'm trying to determine the best way to store large numbers of small .mat files, around 9000 objects with sizes ranging from 2k to 100k, for a total of around half a gig. The typical use case is that I only need to pull a small number (say 10) of…
MatlabSorter
  • 1,290
  • 1
  • 11
  • 19
4
votes
1 answer

Command to import data from file

I'm using MATLAB to organize IR camera measurement data and I'd like to work more efficient than now. The SW for IR camera exports data organised in columns Some text 488.875 1300110589.875 2 14.3.2011 14:49:49.875 0 1 488.875 1300110590.156 …
Crowley
  • 2,279
  • 6
  • 22
  • 36
4
votes
1 answer

Load multiple .mat files for processing

In MatLab I have (after extensive code running) multiple .mat files outputted to .mat files. The actual matlab name of each .mat file is called results but I've used the save command to write them to different files. A small subset of the files…
Tim
  • 2,000
  • 4
  • 27
  • 45
4
votes
3 answers

Why does writing to an unrelated file cause the load function to be so slow?

I've just spent a while debugging some particularly slow code and have been completely thrown off by the MATLAB profiler. This looks to me like a massive bug, so I was wondering if anyone could cast any light on to what is going on here. Here is…
devrobf
  • 6,973
  • 2
  • 32
  • 46
3
votes
2 answers

MATLAB : access loaded MAT file very slow

I'm currently working on a project involving saving/loading quite big MAT files (around 150 MB), and I realized that it was much slower to access a loaded cell array than the equivalent version created inside a script or a function. I created this…
Ben B.
  • 85
  • 2
  • 5
3
votes
3 answers

how can I load a part of .mat file in matlab

I've a mat file with 24 variables inside and I would like to load only the 100 first value of the variables named Var1 and Var2 in the mat file.
2
votes
1 answer

loading multiple .mat files in MATLAB

I have 110 files named time1.mat, time2.mat ..., time110.mat. I want to load these matrices into the MATLAB workspace. I have always used load -'ASCII' matrix.mat to load an ASCII matrix file in the current folder. So I tried doing for i=1:10 …
smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
2
votes
2 answers

Load a field of struct into a variable (MATLAB)

I have a struct stored onto my harddrive. I need to load one of its Field into a local variable. A simple load gets the % 'PRICES' is the stored struct. 1st fieldname is '.Raw'. % Only '.Raw' needs to be loaded var = load( fullfile(path,…
Maddy
  • 2,520
  • 14
  • 44
  • 64
2
votes
1 answer

automating loading of multiple *.mat files & matrix resize

I have a ton of data that needs to be processed from lab work. I have a ton of .mat files that contain a signal matrix of dimensions 7 x w. I need to resize the matrix to 7 x N and w is larger and smaller than N to make the rest of the analysis…
khop
  • 367
  • 1
  • 3
  • 11
1
2 3 4 5