.bat problem using system() or dos()
이전 댓글 표시
so...
>> dos('example.bat')
launches code that interrupts a function until example.bat is "quit"
>
you can manually enter commands on the command line however I cant manage to enter additional commands from a function if you manually enter
>quit
then this is returned
>>
and the function will continue to execute from function.m I need to be able to enter commands like "quit" into the .bat from my function
help?
답변 (1개)
Walter Roberson
2012년 6월 15일
fid = fopen('example.bat','wt');
fprintf(fid, 'first command\n');
fprintf(fid, 'second command\n');
fprintf(fid, 'quit\n');
fclose(fid);
카테고리
도움말 센터 및 File Exchange에서 Automated Driving Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!