function this = eqtn2func(this)

isidentity = ~isnan(this.identity);
neqtn = length(this.eqtnEval);
this.eqtnEvalAll = '';
this.eqtnEvalAllRes = '';

% Replace matrix operators with elementwise operators.
this.eqtnEval = regexprep(this.eqtnEval,'[\*\\/\^]','.$0');
this.eqtnEvalRes(~isidentity) = ...
   regexprep(this.eqtnEvalRes(~isidentity),'[\*\\/\^]','.$0');
this.eqtnEvalIdent(isidentity) = ...
   regexprep(this.eqtnEvalIdent(isidentity),'[\*\\/\^]','.$0');

for i = 1 : neqtn
   this.eqtnEvalAll = [this.eqtnEvalAll,this.eqtnEval{i},';'];
   if ~isidentity(i)
      this.eqtnEvalAllRes = [this.eqtnEvalAllRes,this.eqtnEvalRes{i},';'];
   end
   % Convert char strings to anonymous functions.
   this.eqtnEval{i} = str2func(['@(x,t) ',this.eqtnEval{i}]);
   this.deqtn{i} = str2func(['@(x,t) ',this.deqtn{i}]);
   if ~isidentity(i)
      this.eqtnEvalRes{i} = str2func(['@(x,t) ',this.eqtnEvalRes{i}]);
   else
      this.eqtnEvalIdent{i} = str2func(['@(x,t) ',this.eqtnEvalIdent{i}]);
   end
end
this.eqtnEvalAll = str2func(['@(x,t) [',this.eqtnEvalAll,']']);
this.eqtnEvalAllRes = str2func(['@(x,t) [',this.eqtnEvalAllRes,']']);

end