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: PRdiffusion.m
    path of file: ./repos/IRtools/PRcodes
    
    the code of the file until where you have to start completion: function [A, b, x, ProbInfo] = PRdiffusion(varargin) 
% PRdiffusion Generates data for use in an inverse diffusion problems
%
% [A, b, x, ProbInfo] = PRdiffusion
% [A, b, x, ProbInfo] = PRdiffusion(n)
% [A, b, x, ProbInfo] = PRdiffusion(n, options)
%

    
function [A, b, x, ProbInfo] = PRdiffusion(varargin) 
% PRdiffusion Generates data for use in an inverse diffusion problems
%
% [A, b, x, ProbInfo] = PRdiffusion
% [A, b, x, ProbInfo] = PRdiffusion(n)
% [A, b, x, ProbInfo] = PRdiffusion(n, options)
%
% This function generates a 2D inverse diffusion problem on a uniform
% finite-element mesh with 2*(n-1)^2 triangular elements; think of the
% domain as an n-by-n pixel grid with two triangular elements in each pixel.
%
% The data represents a function u(t) on the grid at time t = Tfinal.
% The goal of the inverse problem is to compute the function u(t) at
% time t = 0 which, when diffused, produces the data.
%
% The forward problem is a very simple diffusion problem
%    du/dt = u_xx + u_yy,   0 < t < Tfinal
% with homogenous Neumann boundary conditions.  It is solved by means of
% the Crank-Nicolson-Galerkin finite-element method.  The inverse problem
% is to compute the initial condition, the function u(0) at time t = 0,
% from the solution u(t) at time t = Tfinal.
%
% The functions u(0) and u(Tfinal) are represented by the vecors x and b,
% resp., which hold the values at the corners of the finite elements.
% Both vectors have a total of n^2 elements.
%
% The severity of the problem increases with Tfinal and does not depend