How to edit the script to run cmd?

조회 수: 9 (최근 30일)
chunqi
chunqi 2013년 7월 15일
Hello
I want to run program cmd in Matlab and i want to build a iterative process. So I want to run the script in cmd via Matlab, but after typing
system('cmd')
the script seems to be useless and I can only deal with the data in the command window. I want to write commands in the script and run it conveniently ?
Thanks in advance
  댓글 수: 1
Jan
Jan 2013년 7월 15일
system starts a command shell already, so starting another instance of CMD from within seems to be useless. Which script do you want to run?

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2013년 7월 15일
편집: Matt J 2013년 7월 15일
Are you running with output arguments to catch the result of the script
[status, result] = system('cmd')
In any case 'cmd' on Windows simply invokes a DOS window, so it's not clear what output you are expecting.
  댓글 수: 1
chunqi
chunqi 2013년 7월 15일
i want to run some commands in the cmd, but i want to write them in the Matlab editor instead of command window, is it possible? It is just a strat, I don't need to output the results right now.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by