필터 지우기
필터 지우기

Converting float data to binary

조회 수: 2 (최근 30일)
Sabeha
Sabeha 2013년 10월 17일
댓글: Walter Roberson 2013년 11월 14일
Hello ,
I have a question about converting floating files to binary files of data suppose that I have a sin signal:
delta_f = 2; f_max = 10^4; fe = 10*f_max; N = fe/delta_f ;
t = (1:N)/ fe; sinus = sin(2*pi*t*10);
figure (1); plot (t,sinus,'r'); title('signal sinusoidale '); xlabel('temps'); ylabel('amplitude');
save it in a file
emplacement_fichier='c:\\test.txt'; fid=fopen(emplacement_fichier,'w'); fprintf(fid,'%s \t, %s\r\n',[t; sinus]); fclose(fid);
how can I creat an other file with all this value in an other file of course I think I have to add an offset for to get only positive values isn't it ?
thanks for your help
  댓글 수: 9
Sabeha
Sabeha 2013년 11월 14일
I want the same columns one for t in binary and one for sin in binary to
Walter Roberson
Walter Roberson 2013년 11월 14일
Binary files do not have columns.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by