Writing results to different files
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am trying to make a code so that when I run my function, the results get saved in different files each time I run it. So for example, I run my code the first time, the results get saved in file 1 then file 2, file 3... so on Is there a way I can accomplish this?
0 commentaires
Réponses (1)
Stephen23
le 9 Nov 2015
Modifié(e) : Stephen23
le 9 Nov 2015
This is such a common question that we have a very detailed description in the wiki page, complete with example code. It has also be answered many times on this forum:
There are several different functions for saving data to text files. Picking the best one depends on the nature of your data, which you do not tell us anything about. You can find a list of these functions here:
3 commentaires
Stephen23
le 9 Nov 2015
Modifié(e) : Stephen23
le 9 Nov 2015
You have not told us what x, y, and z are: are they numeric arrays, cell arrays of steings, tables, character arrays, mixed cell arrays, ...? Are they scalar, 2D, or ND arrays? Each of these requires a different approach to file writing. If you want to tell us exactly what they are, then er can help you to write them to file.
You also need to tell us the required file format, which you have not told us so far.
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!