diff --git a/arfit.m b/arfit.m index 7ae7e616837428a2bddafa2966565d5875f70d76..8b2480ddc9a3d8de1fa977e64abd3d0f53453b29 100644 --- a/arfit.m +++ b/arfit.m @@ -31,6 +31,9 @@ function varargout=arfit(varargin) % $Revision$ % % $Log$ +% Revision 2.6 2007/05/24 12:30:55 marwan +% definitions of criteria checked and corrected +% % Revision 2.5 2006/02/14 11:45:49 marwan % *** empty log message *** % @@ -71,7 +74,7 @@ if ~isempty(findobj('Tag','helpdlgbox')), delete(findobj('tag','helpdlgbox')), e %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('arfit'); +splash_gpl('crp'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check and read the input diff --git a/corrgram.m b/corrgram.m index a30c9624c4e23d8524ae8b5eb2365c1c8ce08398..ad0aacbf80b7ec9f28d1a714f7927e14847cb2ea 100644 --- a/corrgram.m +++ b/corrgram.m @@ -26,7 +26,7 @@ function [c_out, l_out, t_out] = corrgram(varargin) % CORRGRAM(A,B) with no output arguments plots the windowed cross % correlation using the current figure. % -% EXAMPLE: +% Example % x = cos(0:.01:10*pi)'; % y = sin(0:.01:10*pi)' + .5 * randn(length(x),1); % corrgram(x,y) diff --git a/erqa.m b/erqa.m index ef5df789445c8cc2a5d1d75546d3e4f64ed47e41..b81e8163d89cc23ffea33d6b2a92df3a01a93e9f 100644 --- a/erqa.m +++ b/erqa.m @@ -80,6 +80,9 @@ function xout=erqa(varargin) % $Revision$ % % $Log$ +% Revision 1.10 2005/04/01 12:19:27 marwan +% *** empty log message *** +% % Revision 1.9 2004/11/10 07:06:03 marwan % initial import % @@ -171,7 +174,7 @@ if nargout>1, error('Too many output arguments'), end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -filename='erqa'; +filename='crp'; which_res=which([filename,'.m']); gplrc_path=[strrep(which_res,[filename,'.m'],''), 'private']; gplrc_file=[gplrc_path, filesep, '.gpl.',filename]; diff --git a/hist2.m b/hist2.m index b9b0885ef30e241068f7a01271e415046affae21..75089370ec3bddf665209120331dd9924dd1544f 100644 --- a/hist2.m +++ b/hist2.m @@ -33,6 +33,9 @@ function varargout=hist2(varargin) % $Revision$ % % $Log$ +% Revision 1.11 2007/05/25 13:02:48 marwan +% some comments added +% % Revision 1.10 2006/07/04 14:05:08 marwan % lag = zero allowed % @@ -54,10 +57,6 @@ varargin{6}=[]; nogui=1; lag=[]; -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL - -splash_gpl('histn'); - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% read the input x=varargin{1}; diff --git a/histn.m b/histn.m index 8509d5b4b153177af96684a32f82830e9bee91aa..19b4a7452b56a8d963159fba688ecfe94463c94a 100644 --- a/histn.m +++ b/histn.m @@ -36,6 +36,9 @@ function varargout=histn(varargin) % $Revision$ % % $Log$ +% Revision 1.11 2007/05/25 13:02:24 marwan +% *** empty log message *** +% % Revision 1.10 2006/10/24 14:16:16 marwan % minor change: sigma in title line of RP shown only for normalised data % @@ -107,13 +110,6 @@ else end -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL - -if nogui~=2; -splash_gpl('histn'); -end - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% estimate histogram %if size(x,1)<size(x,2), x=x';end diff --git a/jrp.m b/jrp.m index 9a22678229b62d26c287b59447d82ec57656f969..d4dedbe6fb167f6434d14b5067e2207a1fe16c12 100644 --- a/jrp.m +++ b/jrp.m @@ -81,6 +81,9 @@ function xout=jrp(varargin) % $Revision$ % % $Log$ +% Revision 2.7 2007/07/18 17:18:44 marwan +% integer values in the arguments supported +% % Revision 2.6 2007/05/22 12:10:11 marwan % forgotten semicolon % @@ -339,7 +342,7 @@ end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('jrp') +splash_gpl('crp') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% nogui diff --git a/mcf.m b/mcf.m index 8b155e9519a97c9c4f80ee30c43a010da44875a1..01c2f108491b5618f2f127acc401b09a94348b18 100644 --- a/mcf.m +++ b/mcf.m @@ -34,6 +34,9 @@ function [a_out, b_out]=mcf(x,y,w,T) % $Revision$ % % $Log$ +% Revision 1.9 2005/03/16 11:19:02 marwan +% help text modified +% % Revision 1.8 2004/11/10 07:05:43 marwan % initial import % @@ -48,7 +51,7 @@ error(nargoutchk(0,2,nargout)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -filename='hist2'; +filename='ace'; which_res=which([filename,'.m']); gplrc_path=[strrep(which_res,[filename,'.m'],''), 'private']; gplrc_file=[gplrc_path, filesep, '.gpl.',filename]; diff --git a/mi.m b/mi.m index d022936e93a08c62efba3c6ff281937ba4cf723e..33c403d46ddfa7bd530c064c0fa69bbd3550e663 100644 --- a/mi.m +++ b/mi.m @@ -33,6 +33,11 @@ function varargout=mi(varargin) % MI without any arguments calls a demo (the same as the example % below). % +% Remark +% Please note that the mutual information derived with MI slightly +% differs from the results derived with MIGRAM. The reason is that +% MI also considers estimation errors. +% % Examples: x = sin(0:.2:8*pi)' + .1*randn(126,1); % mi(x,40,100) % @@ -51,6 +56,9 @@ function varargout=mi(varargin) % $Revision$ % % $Log$ +% Revision 3.12 2007/07/17 09:04:38 marwan +% bug for single data series resolved +% % Revision 3.11 2007/06/19 12:26:28 marwan % speed enhanced % @@ -87,7 +95,7 @@ if nargout>2, error('Too many output arguments'), end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('mi'); +splash_gpl('crp'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% error control %try diff --git a/migram.m b/migram.m index 3de4e271b98335c242e6a6a9c06ad1dc8c5f3da4..f393dc19a7b82c47549d3f262d2a6ebf02c30b1a 100644 --- a/migram.m +++ b/migram.m @@ -32,7 +32,12 @@ function [c_out, l_out, t_out] = migram(varargin) % MIGRAM(A,B) with no output arguments plots the mutual information % using the current figure. % -% EXAMPLE: +% Remark +% Please note that the mutual information derived with MI slightly +% differs from the results derived with MIGRAM. The reason is that +% MI also considers estimation errors. +% +% Example % x = cos(0:.01:10*pi)'; % y = sin(0:.01:10*pi)' + .5 * randn(length(x),1); % migram(x,y) diff --git a/phasespace.m b/phasespace.m index 1eb78b135300ae7669dff0cce246cafaf470dc34..9e549fce620ccfa0f110a825214911421946058a 100644 --- a/phasespace.m +++ b/phasespace.m @@ -36,6 +36,9 @@ function phasespace(varargin) % $Revision$ % % $Log$ +% Revision 2.3 2006/03/29 13:07:55 marwan +% problems regarding OPRPs and embedding resolved +% % Revision 2.2 2006/02/14 11:46:15 marwan % *** empty log message *** % @@ -102,7 +105,7 @@ end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('phasespace'); +splash_gpl('crp'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% switch routines diff --git a/trackplot.m b/trackplot.m index 4ca78ad42c122b3e408e77e3eb36cb945dfb1455..fc085adf901213b961827b1bc5d577cc192d64ba 100644 --- a/trackplot.m +++ b/trackplot.m @@ -41,6 +41,9 @@ function [tout, Nout] = trackplot(varargin) % $Revision$ % % $Log$ +% Revision 4.10 2005/11/09 08:58:30 marwan +% bug fix in interdependent neighbours method +% % Revision 4.9 2005/09/02 08:02:57 marwan % line fitting algorithm improved (linear interpolation between set points) % @@ -157,7 +160,7 @@ end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('trackplot'); +splash_gpl('crp'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% nogui diff --git a/winplot.m b/winplot.m index b1c88d8ab672b72d7a88517a192ac233ce59ddad..d12ed1b44b3a429e275532912ded4875b3f9a8da 100644 --- a/winplot.m +++ b/winplot.m @@ -32,6 +32,9 @@ function out=winplot(varargin) % $Revision$ % % $Log$ +% Revision 2.4 2006/02/14 11:45:59 marwan +% *** empty log message *** +% % Revision 2.3 2006/02/07 15:31:41 marwan % bug in multi-column input resolved % @@ -139,7 +142,7 @@ end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splash the GPL -splash_gpl('winplot'); +splash_gpl('crp'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% switch routines diff --git a/xcf.m b/xcf.m index e7b4f64d3b20c699d808f23d5c479ecda58918cd..400a8f611d1bac77e23f30f1d2cbc62e9279e39b 100644 --- a/xcf.m +++ b/xcf.m @@ -1,4 +1,4 @@ -function [c_out,s_out]=xcf(x,y,t,flag) +function [c_out,s_out]=xcf(varargin) %XCF Computes and plots crosscorrelation. % [C,S]=XCF(X,Y [,T,FLAG]) computes crosscorrelation C % between the data in the vectors X and Y with the maximal @@ -15,28 +15,40 @@ function [c_out,s_out]=xcf(x,y,t,flag) % $Revision$ % % $Log$ +% Revision 2.1 2004/11/10 07:09:40 marwan +% initial import +% % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as published by the Free Software Foundation; either version 2 % of the License, or any later version. -error(nargchk(1,4,nargin)); +norm = 'nonorm'; +error(nargchk(1,5,nargin)); + +i_num=find(cellfun('isclass',varargin,'double')); +x = varargin{i_num(1)}; +t = []; flag = 0; +if length(i_num) > 1; y = varargin{i_num(2)}; end +if length(i_num) > 2; t = varargin{i_num(3)}; end +if length(i_num) > 3; flag = varargin{i_num(4)}; end % check the input -if nargin<2 +if length(i_num)<2 y=x; end if length(x)~=length(y) error('The lengths of x and y must match.') end -if nargin<3 - t=[]; -end -if nargin<4 - flag=0; + +i_char=find(cellfun('isclass',varargin,'char')); +if ~isempty(i_char) + norm = varargin{i_char}; end + + % check if xcorr exist if isempty(which('xcorr')) @@ -51,8 +63,12 @@ if isempty(which('xcorr')) else % compute xcf -x=trafo(x); -y=trafo(y); +if strcmpi(norm,'norm') + x=trafo(x); + y=trafo(y); +end +x = (x - mean(x)) ./ std(x); +y = (y - mean(y)) ./ std(y); [c, s]=xcorr(x,y,t,'coeff'); c=flipud(c); s=s';