Call an .m file inside an if statement
1 回表示 (過去 30 日間)
古いコメントを表示
Luis Canales Tough
2016 年 4 月 23 日
回答済み: Walter Roberson
2016 年 4 月 23 日
Basically, to reduce the load on the code, I created an .m file with a series of different functions. When I try to execute that .m file within an if statement of another .m file, I get an error.
This is an example of what I have (it worked yesterday, not sure what happened that it doesn't work now):
Note: inside the .m file, a certain equation solves for x.
for y = [n];
run myfile.m
x1 = x
end
0 件のコメント
採用された回答
Walter Roberson
2016 年 4 月 23 日
I recommend you change
run myfile.m
to
myfile
with no run and no .m
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!