Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
This function auto generates a new file for data collection
The baseFileName can be changed to whatever you would like your new .txt
file name to be. Originally it is 'data'.
This function returns 'data1.txt' to your main script which can then be opened and written in using fopen and fprintf provided data1.txt does not already exist.
If data#.txt exists this function generates data(#+n).txt until a nonexisting file name is found. i.e. data20.txt if data1.txt-data19.txt already exists in the current folder.
This is useful for continuous data collection without having to rename the .txt file manually prior to each run to avoid overwriting data.
This function can also generate new .xlsx .xls .csv files by changing the value of extension_ to the desired extension
Citation pour cette source
Joseph Wilson (2026). Making a new .txt or .xlsx file automatically (https://fr.mathworks.com/matlabcentral/fileexchange/72021-making-a-new-txt-or-xlsx-file-automatically), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : Next Available Filename, Avoid file overwrite
Informations générales
- Version 1.0.0.1 (2,24 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.0.0.1 | Updated to receive varying inputs from users
|
||
| 1.0.0 |