%%%%%%%%%%%%%%%%% % % Preprocessing of raw k-space data % %%%%%%%%%%%%%%%%% Nx = 64; % Resolution (assumes equal phase and frequency resolutions) data = readtable('data.txt','ReadVariableNames',false); data = table2array(data(2:end,2:3)); data = strrep(data,',','.'); data = str2double(data); data = data(:,1) + i*data(:,2); data = vec2mat(data,Nx); % Data is now in an Nx X Nx array 'data' of complex numbers