パスを指定してMAT​LABファイルを実行​することはできますか​?

26 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 19 de Ag. de 2016
Respondida: MathWorks Support Team el 19 de Ag. de 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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 19 de Ag. de 2016
エラーの原因は、パスの中に含まれる"\"が演算子と認識されるためです。
このような場合、runコマンドを使用して実行します。
>> run('C:\MATLAB\R2007b\work\myTest');

Más respuestas (0)

Categorías

Más información sobre プログラミング en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!