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: plt_sdm.m
    path of file: ./repos/malini/Codes/FC_EC_calculation code/DynamicFC/jplv7/spatial/sdm_models
    
    the code of the file until where you have to start completion: function plt_sdm(results,vnames)
% PURPOSE: Plots output using SDM model results structures
%---------------------------------------------------
% USAGE: plt_sdm(results,vnames) or plt(results,vnames)
% Where: results = a structure returned by a spatial regression 
%        vnames  = an optional vector of variable names
%                  e.g. vnames = strvcat('y','constant','x1');
%--------------------------------------------------- 
%  RETURNS: nothing, just plots the spatial regression results
% --------------------------------------------------
% NOTE: called by plt.m
% --------------------------------------------------
% SEE ALSO: prt, plt
%---------------------------------------------------   

% written by:
% James P. LeSage, Dept of Economics
% University of Toledo
% 2801 W. Bancroft St,

    
function plt_sdm(results,vnames)
% PURPOSE: Plots output using SDM model results structures
%---------------------------------------------------
% USAGE: plt_sdm(results,vnames) or plt(results,vnames)
% Where: results = a structure returned by a spatial regression 
%        vnames  = an optional vector of variable names
%                  e.g. vnames = strvcat('y','constant','x1');
%--------------------------------------------------- 
%  RETURNS: nothing, just plots the spatial regression results
% --------------------------------------------------
% NOTE: called by plt.m
% --------------------------------------------------
% SEE ALSO: prt, plt
%---------------------------------------------------   

% written by:
% James P. LeSage, Dept of Economics
% University of Toledo
% 2801 W. Bancroft St,
% Toledo, OH 43606
% jlesage@spatial-econometrics.com

if ~isstruct(results)
 error('plt_sdm requires structure argument');
end