Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Wavelet Toolbox. Error using prod Invalid data type. First argument must be numeric or logical. #182

Open
Ben-Girard opened this issue Oct 1, 2020 · 0 comments

Comments

@Ben-Girard
Copy link

Ben-Girard commented Oct 1, 2020

Hello,

I am using Matlab 2020 on Windoys 10. I got an issue probably coming from the Wavelets Toolbox.
When loading .ncs Neuralynx files, I have this error :

Error using prod
Invalid data type. First argument must be numeric or logical.
Error in wmemutil (line 42)
                l       = 3+prod(s);
Error in wavemngr (line 426)
        tab_file      = wmemutil('get',Wavelets_Info,ind_tab_file);
Error in wfilters (line 40)
[wtype,fname] = wavemngr('info',wname);
Error in wavedec (line 36)
        [LoF_D,HiF_D] = wfilters(arg3,'d');
Error in wave_features (line 37)
					[c,l] = wavedec(spikes(i,:),scales,'haar');
Error in wave_clus>load_data_button_Callback (line 234)
    [inspk] = wave_features(spikes,handles.par);                 %Extract spike features.
Error in gui_mainfcn (line 95)
        feval(varargin{:});
Error in wave_clus (line 63)
    gui_mainfcn(gui_State, varargin{:});
Error while evaluating UIControl Callback.

This is solved when not using the Wavelet Toolbox in the wave_features.m :

% 		    if exist('wavedec')                             % Looks for Wavelets Toolbox
% 				for i=1:nspk                                % Wavelet decomposition
% 					[c,l] = wavedec(spikes(i,:),scales,'haar');
% 					cc(i,1:ls) = c(1:ls);
% 				end
% 			else
				for i=1:nspk                                % Replaces Wavelets Toolbox, if not available
					[c,l] = fix_wavedec(spikes(i,:),scales);
					cc(i,1:ls) = c(1:ls);
				end
% 			end

Even if it is now working, maybe it could help someone. If you have any suggestion I would be interested.

Sincerely,

Benoit Girard

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant