% Plot the results of deconv2_discretedata_comp.m
%
% Samuli Siltanen January 2015

% Parameters for controlling the plot
lwidth = 1;
fsize  = 12;
msize  = 6;

% Load precomputed stuff
load data/deconv1_cont Nt t psi Nx x convres a
load data/deconv2  n xvec f tvec p A

% Create a plot window
figure(1)
clf

% Plot target (both continuous and discrete)
subplot(3,1,1)
plot(x,target1(x),'k','linewidth',lwidth)
hold on
plot(xvec,f,'k.','markersize',msize)
xlim([0 1])

% Plot convolution result (both continuous and discrete)
subplot(3,1,2)
plot(x,convres,'r','linewidth',lwidth)
hold on
plot(xvec,A*f(:),'r.','markersize',msize)
xlim([0 1])

% Plot point spread function
subplot(3,1,3)
plot(t,psi,'b','linewidth',lwidth)
hold on
plot(tvec,p,'b.','markersize',msize)
xlim([-.5 .5])
