Write both strings and numbers to a file?
Ältere Kommentare anzeigen
Hello,
Is it possible using fprintf or another function to write both an array of strings and numerical values to a file? I would like to write the variables names as well as their numeric values.
Thank you, Kevin
Akzeptierte Antwort
Weitere Antworten (1)
Star Strider
am 5 Jun. 2014
1 Stimme
If you are exchanging files with someone else who is using MATLAB, use a mat-file. They are easy to use, binary, so are smaller, and do not need formats to write or read. They also associate the variables with their values, and when the files are opened, the variables and values (string, symbolic, numeric, cell) are automatically loaded into the workspace of the function calling them.
1 Kommentar
Kevin Bachovchin
am 6 Jun. 2014
Kategorien
Mehr zu Structures finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!