% Radar signal is read from the radar data.
% There are two subjects - one about the range bin 41 and another around
% We will plot only the data from the first closer subject
%plot variance per range bin
% select the highest variance greater than 20 range bins
t=1/17:1/17:length(radar_sig(:,40))/17;
var_per_bin=var(radar_sig(:,range_bin));
plot(range_bin*0.05, rescale1(var_per_bin'))
xlabel('Range from the radar (m)')
ylabel('Normalized variance of the radar signal')
title('Normalized radar signal variance per range bin')
annonation_save('a)',"Fig11.6a.jpg", 1);
[m,i]=max(var(radar_sig(:,21:end)));
% The subject is at the distance in cm:
disp(['Distance from the subject:' int2str(floor(max_var*5.3)) 'cm'])
Distance from the subject:217cm
plot(t(1:1000),unwrap(phase(radar_sig(1:1000,max_var))))
title('Breathing signal extracted from the radar')
annonation_save('b)',"Fig11.6b.jpg", 1);