function [u_exact, u_noisy]=set_image(m),

%
% Set up 2D image for image denoising.
%
h = 1/(m+1);

% n_s_ratio is the signal_to_noise ratio which controls the size of
% the noise. You may increase or decrease it.
n_s_ratio = 0.5;
    
%  Evaluate exact solution at point P = [x,y].
xvec = [h:h:1-h];
yvec = [h:h:1-h];
[x,y] = meshgrid(xvec,yvec);
r1 = sqrt((x - .5).^2 +(y - .5).^2) ;
r2 = sqrt((x-.5).^2/2 + (y-.5).^2);
u_exact = -.5*(r1<.2) + (r2<.3);
    
%  Add random noise to data.
randn('seed',0);
stddev = norm(u_exact,'fro') * n_s_ratio / m;
u_noisy = u_exact + stddev * randn(m,m);

