execution of external program fails
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I call ghostscript with
cmd = [gs ' -sOutputFile="' outputFile '" -f "' inputFile '"'];
status = system(cmd); % Run Ghostscript.
which results in commands like this one:
gswin32c.exe -q -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -dUseFlateCompression=true -dAutoRotatePages=/None -dHaveTrueTypes -r600 -dGraphicsAlphaBits#4 -dTextAlphaBits#4 -sDEVICE=png16m -sOutputFile="C:\SVN\google code\latexfigure\trunk\example\TEMP9058.png" -f "C:\SVN\google code\latexfigure\trunk\example\TEMP9058.pdf"
This is valid code an works in the command windows of windows. But matlab comlains:
Der Befehl "gswin32c.exe" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
The 'gswin32c' is in the path of windows and I restarted matlab already. What could go wrong?
0 comentarios
Respuestas (2)
Daniel Shub
el 4 de Mzo. de 2012
There is something wrong with the path when you run system. MATLAB doesn't use the same path as the Windows command window. You need to add the full path to gswin32c.exe.
2 comentarios
Daniel Shub
el 5 de Mzo. de 2012
If you look at export_fig Oliver hard coded the paths. It might be unwanted, but it is probably the best you can do.
Oliver Woodford
el 8 de Mzo. de 2012
I suggest you use the ghostcript function that comes with export_fig. It uses a full path if it needs to, but sets it automatically on each pc. You will also need to include the user_string function too.
0 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!