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에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!