fprintf to create a file / precisions
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey Guys, this code is supposed to write Data into Test.dat-file.However, it doesn't work, cause signal is an Cell-Array containing strings.So can u pls help me and correct the code.
fprintf(fid,'%i\t%i\t%i\t%f\t%i\t%f\t%s\n',index,addr,amptotal0,amptotal,amp2,theta,signal)
And if u have some minuts.....the precisions... %f means float / %i menas integer but what does the t and the n mean ?
댓글 수: 0
채택된 답변
dpb
2014년 7월 25일
A)
fmt='%i\t%i\t%i\t%f\t%i\t%f\t%s\n';
fprintf(fid,fmt,index,addr,amptotal0,amptotal,amp2,theta,char(signal))
B)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 C Matrix API에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!