How to read a console data

조회 수: 8 (최근 30일)
Bhatu
Bhatu 2015년 4월 22일
댓글: Bhatu 2015년 4월 22일
Hi,
This is regarding to reading output printed on console. could you please inform me the way to implement it through m code.
Thanks & Regards, Bhatu

답변 (1개)

Ken Atwell
Ken Atwell 2015년 4월 22일
Do you mean the text created by something you run on the command line? Use the system command's second output argument:
>> [status, cmdout] = system('echo "Hello, World"', '-echo')
Hello, World
status =
0
cmdout =
Hello, World
  댓글 수: 1
Bhatu
Bhatu 2015년 4월 22일
Yes! It is similar kind of this but what exactly I want is to read run time output generated by "mdfimport" function. I have created an .exe from m code, which is printing data on console window. Data printed on console is not constant it varies for every different input file. I have to read that data & take action appropriately.

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

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by