You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: PRtomo.m
    path of file: ./repos/IRtools/PRcodes
    
    the code of the file until where you have to start completion: function [A, b, x, ProbInfo] = PRtomo(varargin) 
% IRtomo Generates data for X-ray tomographic reconstruction problems
%
% [A, b, x, ProbInfo] = PRtomo
% [A, b, x, ProbInfo] = PRtomo(n)
% [A, b, x, ProbInfo] = PRtomo(n, options)
% [A, b, x, ProbInfo] = PRtomo(options)
%
% This function uses the "line model" to create a 2D X-ray tomography test
% problem with an N-times-N pixel domain, using p rays for each angle in
% the vector theta.
%
% The severity of the problem is almost unaffected by the problem parameters.
%
% Input:
%  n : size of the image; a scalar such that the size is n x n.
%      Default: n = 256.
%  options : Structure containing the following optional fields:
%    phantomImage - user supplied test image of size n x n, of type numeric,
%             2-D only, or character string indicating
%             'shepplogan' : Shepp-Logan phantom
%             'smooth' : a smooth image
%             'binary' : a binary image
%             'threephases' : random image with pixel values 0, 0.5, 1
%                arranged in domains
%             'threephasessmooth' : similar to threephases, but the
%                domains have smoothly varying pixel values and there is
%                a smooth background
%             'fourphases' : similar to 'binary' but with three phases
%                separated by (thin) structures that form the fourth phase
%             'grains' : a random image with Voronoi cells
%             'ppower' : a random image with patterns of nonzero pixels
%             Default: 'shepplogan'.
%             This image is then stored in the output vector x.
%    CTtype - string that defines the type of CT problem:
%             'parallel'  : parallel beam geometry (default),
%             'fancurved' : fan beam with curved detector.
%    sm     - logical; if true (default )then A is a sparse matrix,
%             otherwise it is a function handle.
%    angles - vector of projection angles, in degrees.
%             Default: 0:1:179 for parallel beam, 0:2:358 for fan beam.
%    p      - number of rays for each source angle.
%             Default: p = round(sqrt(2)*n).
%    d      - Parallel beam only: scalar denoting the distance from the
%             first ray to the last; default: d = p-1.
%    R      - Fan beam only: the distance from the source to the center
%             of the phantom is R*N.  Default: R = 2.
%    span   - Fan beam only: scalar that determines the angular span of
%             the rays, in degrees. The default value is defined such
%             that from the source at (0,R*N) the first and last rays
%             hit the image corners (-n/2,n/2) and (n/2,n/2).
%
% Output:   
%  A : Sparse matrix or function handle for forward/adjoint problem.
%  b : Vector with projection data (the sinogram).
%  x : Vector with image (i.e., exact image with stacked columns).
%  ProbInfo : structure containing some information about problem
%      problemType - kind of test problem (in this case: 'tomography')
%      xType       - solution type (in this case 'image2D')
%      bType       - data type (in this case 'image2D')
%      xSize       - size of image x
%      bSize       - size of sinogram b
%
% See also: PRblur, PRdiffusion, PRinvinterp2, PRnmr, PRseismic,
% PRspherical, PRtomo, PRnoise, PRshowb, PRshowx, radon

% Silvia Gazzola, University of Bath
% Per Christian Hansen, Technical University of Denmark
% James G. Nagy, Emory University
% April, 2018.

% This file is part of the IR Tools package and is distributed under the 
% 3-Clause BSD Licence. A separate license file should be provided as part 
% of the package.

% Initialization: set the default image size.
default_N = 256;

% Check for acceptable number of optional input arguments.
switch length(varargin)
    case 0
        N = default_N; options = [];
    case 1

    
function [A, b, x, ProbInfo] = PRtomo(varargin) 
% IRtomo Generates data for X-ray tomographic reconstruction problems
%
% [A, b, x, ProbInfo] = PRtomo
% [A, b, x, ProbInfo] = PRtomo(n)
% [A, b, x, ProbInfo] = PRtomo(n, options)
% [A, b, x, ProbInfo] = PRtomo(options)
%
% This function uses the "line model" to create a 2D X-ray tomography test
% problem with an N-times-N pixel domain, using p rays for each angle in
% the vector theta.
%
% The severity of the problem is almost unaffected by the problem parameters.
%
% Input:
%  n : size of the image; a scalar such that the size is n x n.
%      Default: n = 256.
%  options : Structure containing the following optional fields:
%    phantomImage - user supplied test image of size n x n, of type numeric,
%             2-D only, or character string indicating
%             'shepplogan' : Shepp-Logan phantom
%             'smooth' : a smooth image
%             'binary' : a binary image
%             'threephases' : random image with pixel values 0, 0.5, 1
%                arranged in domains
%             'threephasessmooth' : similar to threephases, but the
%                domains have smoothly varying pixel values and there is
%                a smooth background
%             'fourphases' : similar to 'binary' but with three phases
%                separated by (thin) structures that form the fourth phase
%             'grains' : a random image with Voronoi cells
%             'ppower' : a random image with patterns of nonzero pixels
%             Default: 'shepplogan'.
%             This image is then stored in the output vector x.
%    CTtype - string that defines the type of CT problem:
%             'parallel'  : parallel beam geometry (default),
%             'fancurved' : fan beam with curved detector.
%    sm     - logical; if true (default )then A is a sparse matrix,
%             otherwise it is a function handle.
%    angles - vector of projection angles, in degrees.
%             Default: 0:1:179 for parallel beam, 0:2:358 for fan beam.
%    p      - number of rays for each source angle.
%             Default: p = round(sqrt(2)*n).
%    d      - Parallel beam only: scalar denoting the distance from the
%             first ray to the last; default: d = p-1.
%    R      - Fan beam only: the distance from the source to the center
%             of the phantom is R*N.  Default: R = 2.
%    span   - Fan beam only: scalar that determines the angular span of
%             the rays, in degrees. The default value is defined such
%             that from the source at (0,R*N) the first and last rays
%             hit the image corners (-n/2,n/2) and (n/2,n/2).
%
% Output:   
%  A : Sparse matrix or function handle for forward/adjoint problem.
%  b : Vector with projection data (the sinogram).
%  x : Vector with image (i.e., exact image with stacked columns).
%  ProbInfo : structure containing some information about problem
%      problemType - kind of test problem (in this case: 'tomography')
%      xType       - solution type (in this case 'image2D')
%      bType       - data type (in this case 'image2D')
%      xSize       - size of image x
%      bSize       - size of sinogram b
%
% See also: PRblur, PRdiffusion, PRinvinterp2, PRnmr, PRseismic,
% PRspherical, PRtomo, PRnoise, PRshowb, PRshowx, radon

% Silvia Gazzola, University of Bath
% Per Christian Hansen, Technical University of Denmark
% James G. Nagy, Emory University
% April, 2018.

% This file is part of the IR Tools package and is distributed under the 
% 3-Clause BSD Licence. A separate license file should be provided as part 
% of the package.

% Initialization: set the default image size.
default_N = 256;

% Check for acceptable number of optional input arguments.
switch length(varargin)
    case 0
        N = default_N; options = [];
    case 1
        if isa(varargin{1}, 'double')
            N = varargin{1}; options = [];
        else
            N = default_N; options = varargin{1};
        end