フィルターのクリア

Read m-file from another file

4 ビュー (過去 30 日間)
saima
saima 2012 年 5 月 12 日
コメント済み: Juan Espinosa 2017 年 11 月 8 日
Hello,
I am doing a thesis. I am going to describe my problem briefly. I need to make an m-file that can take another m-file as input, read it and do some modifications in that file as instructed. How can i do that job of reading?
-Saima
  1 件のコメント
Juan Espinosa
Juan Espinosa 2017 年 11 月 8 日
This could have helped you :(
https://www.mathworks.com/matlabcentral/answers/63149-passing-functions-and-m-files-to-functions
Cheers

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2012 年 5 月 12 日
Use fopen(), fgets() or fgetl(), and fprintf() and fclose(). With that you can open any text file, such as an m-file, change the text however you want, and write it back out.
  2 件のコメント
Soni huu
Soni huu 2012 年 7 月 4 日
編集済み: Walter Roberson 2012 年 7 月 14 日
can u show sample code if my m file in c:\work
m file 1 is the code to identification of data xxx.dat (9 cell)
m file 2 is read m file 1 and [sum cell 4 (cac{4})]/60
thanks..
if normal way.. i must write :
a=sum(cac{4});
ax=a/60
Image Analyst
Image Analyst 2012 年 7 月 5 日
I don't understand what you said.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by