How to save continously generating mat file in a Array in Matlab?

2 次查看(过去 30 天)
Hi all,
I am running a big Matlab programm for 1million iterations i.e. ttt=1000000. To save the output data after regular interval say every 10000 iterations I am putting a command as below and I save the data in mat file say data1.mat
if mod(ttt,10000)==0
save data1.mat
end
every after 10000 iterations the program generating a mat file name data1. This first matfile cointaining a lot of variables. To analysis the data further I need to save this data1.mat file. but the problem is when another 10000 iterstions are completing then another data1.mat file is generating which immediately replacing the previous data1 by the present data1. This is happining untill finish all the iterations. I want to save all the mat file which are generating after every 10000 iterations like below. Hope you guys can help me with this. Thanks in advance.
All_data =[data1,data1,data1......] i.e. All_data =[ data for first 10000(0-10000), data for next 10000 iterations(10001-20000),data for next 10000 iterations(20001-30000),............................].
  3 个评论
Rubel Ahmed
Rubel Ahmed 2021-2-4
编辑:Rubel Ahmed 2021-2-4
Thanks @Walter Roberson. I can save data in matfile but I need to save all the generated matfile(after every 10000 iterations) in one Array/file to analysis furher.
Walter Roberson
Walter Roberson 2021-2-4
The point is that when you use matfile, the file is continually updated as you assign to the variables involved. Just store into one big array.

请先登录,再进行评论。

回答(1 个)

Rubel Ahmed
Rubel Ahmed 2021-2-4
@Walter Roberson Thanks, Can you please describe breifly ?

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by