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
1
vote
1 answer

MATLAB: Opening and Editing Files nested in folders in folders

I'm working on a project where I need to pull files from this expansive directory with many subfolders nested in folders. I'm a complete novice when it comes to using matlab and directories, and I was wondering if anyone could help get me started!…
1
vote
3 answers

How can I load 100 files with similar names and/or string in just one step in MATLAB?

I have 100 ASCII files in my directory all named as follows: int_001.ASC int_002.ASC int_003.ASC . . . int_099.ASC int_100.ASC I have to import them in MATLAB all with importdata, which should work as follows: A =…
ragnar
  • 57
  • 1
  • 4
  • 10
1
vote
1 answer

Loading dataset containing both strings and number

I'm trying to load the following…
Drakthal
  • 193
  • 3
  • 14
1
vote
1 answer

load mat files into matlab and use variables later in the .m file

I only want to load some of the variables from a lot of.mat files (a1.mat, a2.mat.....) into the .m file, and use them as function. Here is my code files=dir('a*.mat'); numfiles=length(files); for…
manxing
  • 3,165
  • 12
  • 45
  • 56
1
vote
1 answer

MATLAB - Load data file with a string file name

I am writing a Matlab program that loads a data file created in another C++ program. planet = input('What is the name of your planet? ', 's') data_file = strcat(planet, '.dat') load(data_file); data_file; x = data_file(:,1); …
arroco.cn
  • 13
  • 1
  • 3
1
vote
1 answer

Matlab simulate neural network mat file in gui

I have saved a neural network in .mat and I would like to simulate this file in my gui. Is it necessary to import this file into workspace then only import from workspace into gui OR we can load it in the gui without having to import it into…
wan
  • 141
  • 2
  • 3
  • 11
1
vote
1 answer

Save correct variable name in workspace

I have a function in matlab. function [MEAN STD]=result(data) MEAN=[mean(data)]; STD=std(data); Training_data=[MEAN STD] savefilename=sprintf('%s',inputname(1)) save(savefilename,'Training_data') end i set data's filename=ET1_A_l1(imported to…
Tony YEe
  • 235
  • 1
  • 3
  • 13
1
vote
2 answers

Compile Matlab files with Load command

I'm new to Matlab compiler. I've got a simple GUI with a button that when it's pressed it calls a m-function (myfunction.m). This function simply return a number that is then showed with a message box. If I compile as: mcc -m myfile.m everything…
Titus Pullo
  • 3,751
  • 15
  • 45
  • 65
1
vote
1 answer

load() - ignoring a given string

I am trying to use the load() function in MATLAB to read in data from a text file. However, every line of the text file ends with '...'. The data file is not produced by MATLAB, so I have no control over the source of the ellipses. The data file I'm…
CaptainProg
  • 5,610
  • 23
  • 71
  • 116
1
vote
1 answer

Load a .mat file into another file without accesing variable name from .mat file

this problem is very annoying. The situation is like this, I am having .mat file with only a single variable in it. I am interesting in loading it in another variable without accessing the variable from the file tha t I am trying to load. Right,…
0
votes
3 answers

How to use if statement when condition is a successful load of data? MatLab

So In a loop, I want all statements to be executed only if the load if data in that loop is successful. Else I want the loop to continue to the next iteration. for l=1:.5:numfilesdata if H(x,y)= load(…
Abid
  • 270
  • 8
  • 18
0
votes
1 answer

How to read .dat file in MATLAB

I am trying to read an ECG signal from PTB dataset, the file extension is ".dat" ,i am using Matlab function for that: load('s0484_re.dat'); where "s0484_re.dat" is the file name but i am getting an error like this: Error using load Unknown text on…
Salar Sali
  • 103
  • 1
  • 8
0
votes
1 answer

MATLAB loading .mat files from gui and accessing variables inside the struct

I'm designing a gui and I am trying to load a mat file into a struct and then access data from the struct. I also want to print the variables in the struct to see if the variables are in the mat file and they work. Thanks, I also don't have much…
Khoa
  • 3
  • 1
  • 3
0
votes
1 answer

loading and plotting csv files

I am a new matlab user trying to load my 145 .csv-files into matlab. The files have similar names and all contain two columns and 3000 rows. I need to be able to work with column 1 and 2 separately for each file and to plot them (column 2 over 1).…
Susu
  • 1
  • 1
  • 1
0
votes
2 answers

Matlab: Good way to save an .m File to variable

Right now I am doing some optimizations which takes some time and I would like to save the results in a good way. As my code is constantly changing I would like to save one or two .m Files together with the results. Just as a backup if I have to see…
Thomas
  • 269
  • 1
  • 5
  • 12