how to convert text file as it was written .m file to call functions?
2 次查看(过去 30 天)
显示 更早的评论
I have bunch of function orders written in text file.
For example text file contains
"move(4,5)
degrade(3)
plussum(6,7)"
and those are supposed to be function name and variables.
I want matlab to read that text file as it was written im .m file to call functions with variables
0 个评论
采纳的回答
更多回答(1 个)
Steven Lord
2024-4-22
If all the text in the file consists of valid MATLAB code and comments, just change the extension from .txt to .m.
另请参阅
类别
在 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!