save the output of system command using matlab
Afficher commentaires plus anciens
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);
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 28 Nov 2016
Leave off the redirection. Just
command = 'MyInstuction';
[status,cmdout] = system(command);
Ano
le 29 Nov 2016
0 votes
3 commentaires
Jan
le 29 Nov 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
le 29 Nov 2016
Jan
le 29 Nov 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".
Catégories
En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!