How to Read code generated tempalate file through m script ?

조회 수: 1 (최근 30일)
Mohan Mishra
Mohan Mishra 2019년 1월 1일
댓글: John D'Errico 2019년 1월 1일
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
John D'Errico
John D'Errico 2019년 1월 1일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by