How to Read code generated tempalate file through m script ?
1 回表示 (過去 30 日間)
古いコメントを表示
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
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 Center および File 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!