Skip to content
Permalink
Browse files

added check of function input

  • Loading branch information...
StolkArjen committed Apr 20, 2019
1 parent bd16db0 commit edec492785c3e043309df583a8f7e4015171e4b8
Showing with 3 additions and 3 deletions.
  1. +3 −3 ft_freqanalysis.m
@@ -292,15 +292,15 @@
if ~isequal(cfg.taper, 'hanning')
ft_error('only hanning tapers are supported');
end
if isfield(cfg, 'output') && ~isequal(cfg.output, 'pow')
ft_error('the output from the irasa method can be power only');
end
% check for foi above Nyquist
if isfield(cfg, 'foi')
if any(cfg.foi > (data.fsample/2))
ft_error('frequencies in cfg.foi are above Nyquist')
end
end
if isequal(cfg.taper, 'dpss') && not(isfield(cfg, 'tapsmofrq'))
ft_error('you must specify a smoothing parameter with taper = dpss');
end

case 'wavelet'
cfg.width = ft_getopt(cfg, 'width', 7);

0 comments on commit edec492

Please sign in to comment.
You can’t perform that action at this time.