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: spyc.m
    path of file: ./repos/malini/Codes/FC_EC_calculation code/DynamicFC/jplv7/graphs
    
    the code of the file until where you have to start completion: function spyc(S,marker,markersize);
% PURPOSE: produces a spy plot with colors

    
function spyc(S,marker,markersize);
% PURPOSE: produces a spy plot with colors
% that reflect the magnitude of the non-zero numbers
% -----------------------------------------------------
% USAGE: spyc(S) or spyc(S,marker,markersize)


if nargin == 2
    markersize = 5;
elseif nargin == 1
    markersize = 5;
    marker = '.';
elseif nargin == 3
    % do nothing
else
    error('spyc: Wrong # of input arguments');
end;
[n,m] = size(S);
[i,j,ss] = find(S);  % Note we need the values of the nonzeros as 
                     % well as their indices
if isempty(i), i = NaN; j = NaN; end