Hi :)
Its my first post in matlab forum. I want to know how to create text file in matlab programming (giving example will be appriciated). And after creating and have some operation(changing its contents only) on that file, how can we read that file's content back in matlab.
thanks sincerely, fazal khan

 Respuesta aceptada

Mikhail
Mikhail el 29 de Ag. de 2014

0 votos

Hi, http://www.mathworks.com/help/matlab/ref/fprintf.html - to write into a file (and create it)
You can find examples there. Also commands save and load are much easy to deal with.

1 comentario

Image Analyst
Image Analyst el 29 de Ag. de 2014
Don't forget fgetl() for reading in whole lines into a string, in case that is what is needed.

Iniciar sesión para comentar.

Más respuestas (2)

José-Luis
José-Luis el 29 de Ag. de 2014

0 votos

The documentation has plenty of examples. For example the relatively low-level fprintf()

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Ag. de 2014

Respondida:

el 5 de Oct. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by