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
2
votes
3 answers

Load Multiple .mat Files to Matlab workspace

I'm trying to load several .mat files to the workspace. However, they seem to overwrite each other. Instead, I want them to append. I am aware that I can do something like: S=load(file1) R=load(file2) etc. and then append the variables…
CHP
  • 895
  • 5
  • 13
  • 28
1
vote
1 answer

Read specific column from .mat file in matlab

I want to load specific column form .mat file already exist in the work space after I load it how should I write then ?
Ocean Blue
  • 33
  • 4
  • 7
1
vote
2 answers

what happens when you load a directory?

I am trying to learn some simple matlab code posted by my professor, and the first line goes somehting like load /class/mat121/lab1/data I've never seen "load" used like this before, what does it do? does it load all .m files in the directory? I…
Bonk
  • 1,859
  • 9
  • 28
  • 46
1
vote
3 answers

load mat file in workspace

I have a folder A that contains folders B and C A--B C--| --|mat file at the folder level, I have a startup scrit and I want from this script to load data available in data.mat file available in C1 folder. so from my script A_script.m , I…
lola
  • 5,649
  • 11
  • 49
  • 61
1
vote
2 answers

Load complex MATLAB .mat file in clojure / Incanter

In my quest to get ride of MATLAB and replace it with Incanter / Clojure I need to be able to load or at least convert a few terabytes of matlab .mat files. As these are rather complex mat files, with structs and cell arrays nested in all different…
Ali
  • 18,665
  • 21
  • 103
  • 138
1
vote
2 answers

how to update a variable in a .mat file for matlab?

I have a matlab .mat file that stores a bunch of variables. How do I update a single variable? I tried doing this: load('filename.mat'); variable='Test'; save('filename.mat',variable); but it says ??? Error using ==> save Variable 'C:\' not…
O_O
  • 4,397
  • 18
  • 54
  • 69
1
vote
3 answers

Stumped trying to implement Save/Load object functionality in a MATLAB UI

I am trying to implement save/load functions in a MATLAB (R2009a) UI. My object implements a layout function that generates a user interface for the object. I am trying to implement the callbacks for the save/load buttons. The save button works…
Azim J
  • 8,260
  • 7
  • 38
  • 61
1
vote
1 answer

Why is parfor slow despite slicing?

I have a simple parfor loop given below. % fileAddr is a cell array of (size N) of file-addresses sIdx = nan(N,1); eIdx = nan(N,1); errMsg = cell(N,1); parfor i=1:N [sIdx(i),eIdx(i),errMsg{i}] = myFunk(fileAddr{i}); end The function file…
Abhinav
  • 1,882
  • 1
  • 18
  • 34
1
vote
1 answer

Loading '*.mat' correctly but form another unknown location

I got 2 functions in my matlab script. These functions exchange the data via a *.mat file. In one of the functions, I read the number of specific files and a data from them. Later I process and store the variable ggd in proj1.mat file. As shown…
adi
  • 39
  • 7
1
vote
1 answer

Matlab 'load' figure objects from '.mat' file opens plot window

Why does MATLAB open a plot window when I load a .mat file that contains a figure inside an struct? The problem that I am facing is that I have the output of an optimization algorithm as a collection of .mat files. Each .mat file contains the state…
MxNx
  • 1,342
  • 17
  • 28
1
vote
0 answers

Matlab loading slowdown in loop

After a long time searching for an answer and not having found one, my last resort is asking a new question. I create multiple (N=1000) -mat v-6 files that are each about 100 MB in size and contain a single matrix. In a separate part of my code, I…
J. Lopez
  • 11
  • 2
1
vote
1 answer

Load any file type into matlab

I have a matlab GUI....I'd like to load ANY file type(doc,txt,dat,xls) into matlab as a matrix through the GUI...I'd appreciate any help I can get!!
Tim
  • 61
  • 1
  • 1
  • 12
1
vote
1 answer

How to load data in MATLAB from current script folder?

There is a script myScript.m, under D:\myProjects, so its location is D:\myProjects\myScript.m I want to load a .dat file at D:\myProjects\myData\someData.dat How do I use the load() function without using the absolute path like data =…
Nick X Tsui
  • 2,737
  • 6
  • 39
  • 73
1
vote
2 answers

Txt import in Matlab, different row formats

I need to import variables from a txt file. This file has 3 main parts. A) Initial headlines, containing general information B) Headlines-Variables, in every column C) Numerical data in every column As below: Headlines - Headlines - Headlines -…
Evans1985
  • 13
  • 3
1
vote
2 answers

How to load .mat file which has a variable filename?

%select all .mat files oar = dir('*oar.mat'); n = {oar.name}; %loop through files for l=1:length(oar); load pat_oar(l) %<---this is the .mat file with variable filename clear ... end How do I write some Matlab script that will read in one…
2one
  • 1,035
  • 3
  • 17
  • 36