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: solveExplicitPDE.m
    path of file: ./repos/FVTool/Solvers
    
    the code of the file until where you have to start completion: function phi = solveExplicitPDE(phi_old, dt, RHS, BC, varargin)
% phi = solveExplicitPDE(phi_old, dt, RHS, BC, varargin)
% SolveExplicitPDE solves for the new value of variable \phi in an explicit

    
function phi = solveExplicitPDE(phi_old, dt, RHS, BC, varargin)
% phi = solveExplicitPDE(phi_old, dt, RHS, BC, varargin)
% SolveExplicitPDE solves for the new value of variable \phi in an explicit
% discretization scheme: \phi_new = \phi_old + dt/ * RHS
% the real equation is d\phi/dt=RHS
% The code calculates the new values for the internal cells. Then it uses
% the boundary condition to calculate the values for the ghost cells

% SYNOPSIS:
%
%
% PARAMETERS:
%
%
% RETURNS:
%
%
% EXAMPLE:
%
% SEE ALSO:
%

% Written by Ali A. Eftekhari
% See the license file

% this is not the most beautiful implementation, but it works.
if nargin==5
    x = phi_old.value(:)+dt*RHS./varargin{1}.value(:);
else
    x = phi_old.value(:)+dt*RHS;
end