how to convert text file as it was written .m file to call functions?
Show older comments
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
Accepted Answer
More Answers (1)
Steven Lord
on 22 Apr 2024
0 votes
If all the text in the file consists of valid MATLAB code and comments, just change the extension from .txt to .m.
1 Comment
Melih Furkan SEN
on 25 Apr 2024
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!