how to read textfile that contains mupad expression into mupad session?
4 ビュー (過去 30 日間)
古いコメントを表示
Nasser M. Abbasi
2015 年 6 月 15 日
コメント済み: Nasser M. Abbasi
2015 年 6 月 15 日
I have a text file, say "foo.txt" that contains one mupad statement such as
x:=[1,2,3];
And from the mupad notebook interface (not Matlab's workspace), I want to simply evaluate this so that `x` will be defined in memory so I use this list later.
I have reason why I need the statement to be in file.
Currently, I have to open the text file using external editor, copy it and paste it into a cell in the notebook to be able to use it.
Is there a way to evaluate/read this file and have mupad evaluate it? This is easy to do in Maple like this:
read foo.txt
and now `x` is read and evaluated as if one had typed the content of the file in the notebook. I looked at all the mupad input/output calls, such as readdata
but the above does not do what I want. I am using Matlab 2015a.
0 件のコメント
採用された回答
Walter Roberson
2015 年 6 月 15 日
You will probably want to use the Plain option, which is shown further at http://www.mathworks.com/help/symbolic/mupad_ref/fread.html
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MuPAD についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!