https://doi.org/10.5201/ipol.2017.178
Tip revision: ce7312fc5141c3085e2c9a49d0904825df754c37 authored by Software Heritage on 25 May 2016, 00:00:00 UTC
ipol: Deposit 1296 in collection ipol
ipol: Deposit 1296 in collection ipol
Tip revision: ce7312f
loadfile_recovery.m
%% loadfile_recovery
% Loads output<filesuffix>.txt file which is the output of ./prSAMP_Recovery in Unix or
% prSAMP_Rec_BinaryTM.exe in Windows.
%%
function x_hat = loadfile_recovery(filesuffix, n)
x_hat = zeros(n,1);
fileID = fopen(['output' num2str(filesuffix) '.txt'],'r');
temp = fscanf(fileID,'%lf');
fclose(fileID);
cnt = 1;
for i=1:n
x_hat(i) = temp(cnt)+temp(cnt+1)*1i;
cnt = cnt + 2;
end