Error of too many output arguments

조회 수: 1 (최근 30일)
MrPuzzled Marc
MrPuzzled Marc 2011년 5월 4일
Hi, I have a piece of code:
ChunkSize=5000*16;
IF=length(F);
D=[];
for send_count=0:ChunkSize:IF-1
bytecount=min(send_count+ ChunkSize, IF)-send_count;
D=F(send_count+1:send_count+bytecount);
sentcount=fprintf(s,D);
However I have the error of:
??? Error using ==> serial.fprintf
Too many output arguments.
Error in ==> serial_interface>button_send_Callback at 160
sentcount=fprintf(s,D);
I think the main concern is my MATLAB is not compatible with the newer version.Hence how could I solved this?

채택된 답변

Walter Roberson
Walter Roberson 2011년 5월 4일
Serial printf doesn't support the output argument. I will have a fix for you a bit later today.
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 5월 4일
Replace
sentcount=fprintf(s,D);
with
oldvalcount = s.ValuesSent;
fprintf(s,D);
sentcount = s.ValuesSent - oldvalcount;

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by