function [logRS,logERS,V]=RSana(x,n,method,q)
% Alexandros Leontitsis
% Department of Education
% University of Ioannina
% 45110 - Dourouti
% Ioannina
% Greece
%
% University e-mail: me00743@cc.uoi.gr
% Lifetime e-mail: leoaleq@yahoo.com
% Homepage: http://www.geocities.com/CapeCanaveral/Lab/1421
%
% 1 Jan 2004.
if nargin<1 | isempty(x)==1
error('You should provide a time series.');
else
% x must be a vector
if min(size(x))>1
error('Invalid time series.');
end
x=x(:);
% N is the time series length
N=length(x);
end
if nargin<2 | isempty(n)==1
n=1;
else
% n must be either a scalar or a vector
if min(size(n))>1
error('n must be either a scalar or a vector.');
end
% n must be integer
if n-round(n)~=0
error('n must be integer.');
end
% n must be positive
if n<=0
error('n must be positive.');
end
end
if nargin<4 | isempty(q)==1
评论4