How to save continously generating mat file in a Array in Matlab?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 4 de Feb. de 2021
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.
Respuestas (1)
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!