function x = mypct(x,s,q)
% MYPCT  [Not a public function] Percent rate of change.
%
% Backed IRIS function.
% No help provided.

% The IRIS Toolbox.
% Copyright (c) 2007-2012 Jaromir Benes.

%**************************************************************************

if nargin < 2
    s = -1;
end
if nargin < 3
    q = 1;
end
s = s(:).';

index = transpose(1:size(x,2));
index = index(:,ones(1,length(s)));
index = transpose(index(:));

x = x(:,index) ./ tseries.myshift(x,s);
if q ~= 1
    x = x .^ q;
end
x = 100*(x - 1);

end