clear all; close all; n = 24; % number bits for integer part of your number m = 0; % number bits for fraction part of your number a = xlsread('D:\DSD_project_nagpur\matlab codes\24bit\mel_constants_bin.xlsx'); a = a; for i = 1 x = fix(rem(a(:,i)*pow2(-(n-1):m),2)); hexval(:,i) = binaryVectorToHex(x); end b = hexval(:,1); [FileName,PathName] = uiputfile('*.xlsx','Save file','D:\DSD_project_nagpur\matlab codes\voice_input_hex.xlsx'); fname = fullfile(PathName, FileName); xlswrite(fname, hexval)