save the output of system command using matlab
Mostrar comentarios más antiguos
Hello! I am executing a system command via matlab. in the command I am writing the output to a file. when running the code I can find the generated file but I want that file be passed to Matlab as a variable, how can I get to this ? see the code bellow (I want something so that fileA.txt be attributed to cmdout or any thing similar so Matlab can recognize and work directly with the file)
command = 'MyInstuction >fileA.txt';
[status,cmdout] = system(command);
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 28 de Nov. de 2016
Leave off the redirection. Just
command = 'MyInstuction';
[status,cmdout] = system(command);
Ano
el 29 de Nov. de 2016
0 votos
3 comentarios
Jan
el 29 de Nov. de 2016
Please post comments in the comment section, not as an answer. Thanks.
How can the generated file be large, if you omit the generation of a file? How could we know, where you can find the wanted parts of the replied string?
Ano
el 29 de Nov. de 2016
Jan
el 29 de Nov. de 2016
If the repsonse is time critical, please answer my questions for clarifications. I'd really like to assist you, but I cannot guess, "how can I know where my data is placed".
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!