Append rows to .mat file
Show older comments
Hello, I have a folder for example file_1 . I want to create a data.mat with the files that I have in file_1. Each time I add data to file_1 I would like to update the .data.mat and add the data in the next row of data.mat. How can I do it?
dataNew = data;
save(fullfile(mat_path ,'data'),'data');
1 Comment
Raj
on 12 Sep 2019
"I want to create a data.mat with the files that I have in file_1" - What type of files?
"Each time I add data to file_1 " - In what way? Are you appending the existing file or adding new file?
Accepted Answer
More Answers (1)
per isakson
on 14 Sep 2019
0 votes
2 Comments
blues
on 23 Oct 2019
Hi,
I have 4 variables in the following format: (x, y, z, value). I would like to write a .mat file so that I can have
(0, 0, 0, 0.1); % I can write this by using (save test.mat x y z value)
(0, 0,1, 0.2); % how to add these lines without overwriting previous values?
(0, 1, 0, 0.3);
....................
How can I write this kind of .mat file? Any help would be hugely appreciated.
Felix Lupp
on 12 Dec 2023
This is how I would do it.
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!