writing a binary number in a txt file in matlab -
i have binary number , want save on txt file.my code :
fid=fopen('rt.txt','w') fprintf(fid,'%d',00111111100000000000000000000000 ); fclose(fid);
but saved value in file : 1.111111e+029 want save value same in binary format(32bit number wrote here) can me plssss
00111111100000000000000000000000
not binary number in matlab. can save string '00111111100000000000000000000000'
, or if want convert binary string decimal number, can use bin2dec('00111111100000000000000000000000')
. , convert decimal number binary string (which still array of characters), use dec2bin(33)
.
Comments
Post a Comment