Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

I want to create a data file where i want to enter a gain value and a 1x96000 array. i am unable to read both values separately. i have written the following code. after using the following code the data and gain have not been retrieved.

1 visualización (últimos 30 días)
gain = 24.08; data = [0:1:96000]; fid = fopen('jibs.dat','ieee-be'); if if~=-1 fseek(fid,276,'bof') end fwrite(fid,gain,'float32') fseek(fid,5120,'bof') fwrite(fid,data,'float32') fclose(fid) clc clear all %%%% to read data %%%%% fid = fopen('jibs.dat','ieee-be'); fseek(fid,276,'bof'); gain2 = fread(fid,1,'float'); fseek(fid,5120,'bof'); data2 = fread(fid,'inf','float'); fclose (fid)

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by