Dos command gives error

4 次查看(过去 30 天)
sita
sita 2013-3-26
评论: Ahmed 2018-1-8
Hi, dos('C:\Program Files\OrcadLite\PSpice\psp_cmd.exe test1.cir'); above code works at cmd prompt but not working in matlab and gives below errror
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
.Please help me resolving this.
Thanking You, Sita

采纳的回答

C.J. Harris
C.J. Harris 2013-3-26
If you want to send commands to an executable you need to modify the call slightly.
Try this:
dos('"C:\Program Files\OrcadLite\PSpice\psp_cmd.exe" test1.cir');
  2 个评论
sita
sita 2013-3-26
thank you...it worked..
Ahmed
Ahmed 2018-1-8
Thank you sooooooo much

请先登录,再进行评论。

更多回答(1 个)

Wayne King
Wayne King 2013-3-26
Try this to get the correct path and string options
[file, path] = uigetfile('*.m', 'Select File');
fullFilename = fullfile(path, file);
Select the executable so that you get that path back with fullFilename.
Then try
dos(fullFilename)
does that open your application?
  1 个评论
sita
sita 2013-3-27
Yes,i could my application.Thanks for you response.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by