Responding to multiple DOS prompt questions from MATLAB command
    1 visualización (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Amitava Guha
 el 28 de Mayo de 2015
  
    
    
    
    
    Respondida: Walter Roberson
      
      
 el 29 de Mayo de 2015
            I am working on an optimization problem where I need to run a third party command prompt based software from MATLAB. This software does not take input directly while calling it like:
 eval('!Hydmes.exe filename Username')
Instead, two inputs (filename, username) are required to provide one after another after the program is run.
I found a similar question here , but since I have two inputs I couldn't figure out how to solve this problem. Hence, currently I am stuck at MATLAB running this program and waiting for manual input of the filename and username. I am using Matlab2014b.
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 29 de Mayo de 2015
        tfilename = tempname;
fid = fopen(tfilename, 'wt');
fprintf(fid, '%s\n', filename);
fprintf(fid, '%s\n', Username);
fclose(fid);
system(sprintf('"%s" < "%s", 'Hydmes.exe', tfilename));
delete(tfilename);
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Search Path 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!

