Skip to content
Snippets Groups Projects
Commit c2ff3df3 authored by marwan's avatar marwan
Browse files

bug in normalized norm for variable y fixed

parent 5786f81c
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,9 @@ function xout=crp2(varargin) ...@@ -86,6 +86,9 @@ function xout=crp2(varargin)
% $Revision$ % $Revision$
% %
% $Log$ % $Log$
% Revision 5.20 2014/09/23 07:11:25 marwan
% Matlab R2014b incompatibility issues fixed
%
% Revision 5.19 2012/10/22 14:18:33 marwan % Revision 5.19 2012/10/22 14:18:33 marwan
% bug fix: normalisation of data when data contains Inf % bug fix: normalisation of data when data contains Inf
% %
...@@ -316,7 +319,7 @@ if isnumeric(varargin{1}) % read commandline input ...@@ -316,7 +319,7 @@ if isnumeric(varargin{1}) % read commandline input
x(:,k) = (x0(:,k) - meanx) / stdx; x(:,k) = (x0(:,k) - meanx) / stdx;
end end
for k = 1:size(y0,2) for k = 1:size(y0,2)
idy = find(~isinf(x0(:,k))); idy = find(~isinf(y0(:,k)));
stdy = std(y0(idy,k)); stdy = std(y0(idy,k));
meany = mean(y0(idy,k)); meany = mean(y0(idy,k));
y(:,k) = (y0(:,k) - meany) / stdy; y(:,k) = (y0(:,k) - meany) / stdy;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment