return type of fgetl(serial)

hi, i wanted to know the return data type(string, char ,array?) of fgetl(serial), because i need to read port through fgetl(serial).
http://www.mathworks.com/help/techdoc/ref/serial.fgetl.html

답변 (2개)

Jan
Jan 2011년 2월 24일

1 개 추천

What about trying it?
x = fgetl(serial);
disp(class(x));
Looking in "doc serial/fgetl" it looks like it is a CHAR.

댓글 수: 2

Walter Roberson
Walter Roberson 2011년 2월 24일
Possibly upon timeout or end-of-file it would return a different class of data such as the number -1 or an empty numeric array. You would need to test this case.
Jan
Jan 2011년 2월 24일
I've read http://www.mathworks.com/help/techdoc/ref/serial.fgetl.html and find the description of the outputs too vague. "[tline,count,msg] = fgetl(obj)" is helpful to detect timeouts and errors, but what is "msg" in case of success exactly?
@Safiullah Khan: The documentation is not clear enough in this point. Please send an enhancement request to TMW.

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

Safiullah Khan
Safiullah Khan 2011년 3월 2일

0 개 추천

how to send msg to TMW?

댓글 수: 2

Walter Roberson
Walter Roberson 2011년 3월 2일
http://www.mathworks.com/support/contact_us/index.html
Jan
Jan 2011년 3월 2일
Command window -> Help -> Web Resources -> Support
or
Type in the command window: "support". Then look for the contact form.

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

카테고리

도움말 센터File Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

태그

질문:

2011년 2월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by