フィルターのクリア

Problem with updating a modified text file

3 ビュー (過去 30 日間)
Saeed Soltani
Saeed Soltani 2016 年 5 月 31 日
コメント済み: Saeed Soltani 2016 年 6 月 2 日
Hi, I have a GUI which get new word as input, then parse my Matlab file (.m) and replace the word with an especial word. Then I use the updated Matlab file. Although the file is updated (the corresponding word is replaced), some time when I run the code, it evaluate based on the last word (which is false and makes error). The interesting part is, when I click on the error line (which says for ex. This “word” is not existed), it goes through my code and shows the right word. It means that it is already replaced but it is still using the last word. Any help would be appreciated : )

採用された回答

per isakson
per isakson 2016 年 5 月 31 日
編集済み: per isakson 2016 年 5 月 31 日
To remove the old version from memory, add
clear('name_of_your_m_file')
directly after (or before) the line where you save the new version of the file. And see inmem
  1 件のコメント
Saeed Soltani
Saeed Soltani 2016 年 6 月 2 日
Thanks :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by