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 ?

采纳的回答

dpb
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 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by