Borrar filtros
Borrar filtros

How to Read code generated tempalate file through m script ?

1 visualización (últimos 30 días)
Mohan Mishra
Mohan Mishra el 1 de En. de 2019
Comentada: John D'Errico el 1 de En. de 2019
I am trying to read code generated tempalate through m script. The main intention is to read "/*...*/" in code generated tempalate and if particular string is found then generate error file.
  1 comentario
John D'Errico
John D'Errico el 1 de En. de 2019
So what is the problem? Read in one line at a time (fgets would help here). Or read in the entire file as a set of strings. Use textread perhaps for that option.
In either case, now just process each line, one at a time. This is just a loop.
Inside the loop, you will be using perhaps regexp, or you could use strfind.
So just start writing. If you get stuck, and don't know how to solve a specific problem, then ask. Show what you did, and explain your problem.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Low-Level File I/O 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!

Translated by