パスを指定してMATLABファイルを実行することはできますか?
22 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Aug 2016
Answered: MathWorks Support Team
on 19 Aug 2016
絶対パスを指定してMATLABファイルを実行する方法を教えてください。以下の方法で"myTest.m"を実行しようとすると、エラーとなります。
>> C:\MATLAB\R2007b\work\myTest
??? C:\MATLAB\R2007b\work\mytest
|
エラー: 予期せぬ MATLAB 演算子です。
英語版の場合 ERROR: ??? C:\MATLAB\R2007b\work\myTest | Error: Unexpected MATLAB operator.
Accepted Answer
MathWorks Support Team
on 19 Aug 2016
エラーの原因は、パスの中に含まれる"\"が演算子と認識されるためです。
このような場合、runコマンドを使用して実行します。
>> run('C:\MATLAB\R2007b\work\myTest');
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!