Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in proc_spectrogram?! #192

Closed
stephaniebrandl opened this issue Jul 11, 2016 · 1 comment
Closed

bug in proc_spectrogram?! #192

stephaniebrandl opened this issue Jul 11, 2016 · 1 comment

Comments

@stephaniebrandl
Copy link

I was wondering if there might be bug in line 104/105,
since for

dat.x=[];
ndims(dat.x)==2

will always hold.
So maybe dat.x=[] should be moved to after the if statement?!

X=dat.x;
dat.x=[];
if ndims(dat.x) == 2      % cnt
    for chan=1:sz(2)
        [S,F,T] = spectrogram(X(:,chan),opt.Window,opt.NOverlap,freq,dat.fs);
        dat.x(:,:,chan)=S;
    end
elseif ndims(dat.x)==3    % epoched
    for chan=1:sz(3)
        for seg=1:sz(2)
            [S,F,T] = spectrogram(X(:,seg,chan),opt.Window,opt.NOverlap,freq,dat.fs);
            dat.x(:,:,seg,chan)=S;
        end
    end
end
@DanielMiklody
Copy link
Contributor

Hey, yes, seems to be leftovers of debugging? Since I must have written this, I will take it!

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

No branches or pull requests

2 participants