Dos command gives error

3 Ansichten (letzte 30 Tage)
sita
sita am 26 Mär. 2013
Kommentiert: Ahmed am 8 Jan. 2018
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

Akzeptierte Antwort

C.J. Harris
C.J. Harris am 26 Mär. 2013
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 Kommentare
sita
sita am 26 Mär. 2013
thank you...it worked..
Ahmed
Ahmed am 8 Jan. 2018
Thank you sooooooo much

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Wayne King
Wayne King am 26 Mär. 2013
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 Kommentar
sita
sita am 27 Mär. 2013
Yes,i could my application.Thanks for you response.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by