Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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 vue (au cours des 30 derniers jours)
jibs
jibs le 4 Juin 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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)

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by