title: How to use the new functions of PDE toolbox in image processing (Matlab R2015a)
body: <p>I want to use the line new command of PDE toolbox as Matlab R2015 to restore a noisy image with gaussian noise.</p>
  
  <p>The PDE is:</p>
  
  <p><i>&#x2207;</i>.(( <i>&#x2207;</i>u)/(&#x221a;(1+|<i>&#x2207;</i>u|<sup>2</sup>))) +(<i>f</i><sup>2</sup>)/(<i>u</i><sup>2</sup>) = 1 in &Omega; (<i>&#x2202;</i>u)/(<i>&#x2202;</i>n)=0 in <i>&#x2202;</i>&Omega;</p>
  
  <p>Where <i>f</i> is the noisy image and <i>u</i> the restored image.</p>
  
  <p>I tried the following code:</p>
  
  <pre><code>clear 
  close all
  clc
  
  img = 'AA.jpg';
  mInputImage = double(imread(img));
  mInputImage = rgb2gray(mInputImage);
  [numRows, numCols] = size(mInputImage);
  
  Var = 0.04;
  Mean = 0;
  mInputImageNoisy = imnoise((mInputImage(:,:,1)),'gaussian',Mean, Var); 
  
  % reshape the input and noisy images to vectors
  mInputImageVector = reshape(mInputImage,numRows*numCols,1);
  mInputImageNoisyVector = reshape(mInputImageNoisy,numRows*numCols,1);
  
  Residu1 = norm(mInputImageVector-mInputImageNoisyVector)/norm(mInputImageVector)
  
  RegularisationCoefficient = 0.7*ones((numRows-1)*(numCols-1),1);
  mOutputImageVector = mInputImageNoisyVector;
  %a = (mInputImageNoisyVector.^2) ./ mOutputImageVector.^3;
  f = 1;
  rtol = 1e-1;
  c = '1./sqrt(1+ux.^2+uy.^2)';
  
  % Create a PDE Model with a single dependent variable
  numberOfPDE = 1;
  pdem = createpde(numberOfPDE);
  
  g = @squareg;
  geometryFromEdges(pdem,g);
  
  % Plot the geometry and display the edge labels for use in the boundary
  % condition definition.
  figure;
  pdegplot(pdem, 'edgeLabels', 'on');
  %axis([0 numRows 0 numCols]);
  axis([-2 2 -2 2]);
  title 'Geometry With Edge Labels Displayed'
  
  
  b2 = applyBoundaryCondition(pdem,'Edge',[1 2 3 4], 'u', 0);
  
  [p,e,t] = poimesh(g,numRows, numCols);
  numCols
  pdemesh(p,e,t);
  axis equal
  
  for iter = 1: numRows*numRows,
  mOutputImageVector(iter) = pdenonlin(pdem,c,...
       (mInputImageNoisyVector(iter).^2) ./ mOutputImageVector(iter).^3,...
                f,'tol',rtol);
  SaveImageVector(iter) = mOutputImageVector;
  end
  
  mOutputImage = reshape(SaveImageVector,numRows,numRows);
  
  mOutputImage = uint8(mOutputImage);
  
  figure()
  imshow(mOutputImage)
  </code></pre>