How can I solve a problem when running a batch file within Matlab ?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
I am trying to run Abaqus from Matlab using a .bat file, but I have received an error message : 'Ab.bat' is not recognized as an internal or external command, operable program or batch file. I tried to use (mex -setup) command but still have this error? I have (Intel Visual Fortran Composer XE 2013 SP1 with Microsoft Visual Studio 2012 on my PC).
Many thanks
採用された回答
Try
system( fullfile( folderspec, Ab.bat ) )
9 件のコメント
ND
2015 年 6 月 1 日
it dose not work? Given the same error.
per isakson
2015 年 6 月 1 日
編集済み: per isakson
2015 年 6 月 1 日
I can only guess why you see this error. Does Ab.bat run in the cmd-window? Try
c:\> "d:\full\path\to\Ab.bat"
If that does run copy&paste the command string to matlab
system( '"d:\full\path\to\Ab.bat"' )
and it should work.
ND
2015 年 6 月 1 日
it works in one PC while still have error in the second while I am using the same command!
As Ab.bat present on both machines and installed in the same location?
ND
2015 年 6 月 1 日
Yes, I am using it with the same location.
per isakson
2015 年 6 月 1 日
編集済み: per isakson
2015 年 6 月 1 日
Does Ab.bat run properly in the Command Prompt Window of both machines? If not, what does
c:\> where ab.bat
return?
C:\Temp>echo off 'Abaqus' is not recognized as an internal or external command, operable program or batch file.
ans =
0
In c:\> return ....is not recognized as ..... In the second one runs OK
per isakson
2015 年 6 月 1 日
編集済み: per isakson
2015 年 6 月 1 日
I don't understand exactly what you tried, but to me it seems obvious that Ab.bat and/or Abacus are not properly installed on the first machine. It's not a Matlab problem. Did you try
c:\> where Ab.bat
On the second one it will have given a file name with directory. Look in the same directory on the first one and verify that Ab.bat is present there. Tell your Windows Explorer to show file extensions so that you can verify that it has not become (for example) Ab.bat.doc or Ab.txt
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
