Variable error not defined

0

I have this code and it tells me that Spec is not defined in (pcolor (freq, tstart, Spec); colorbar), but I'm calculating it in the loop .. Does anyone realize why the error? Thank you!

N

size=N;%dimensão da Janela móvel
Nsize2=Nsize/2;
df=fNyq/Nsize2;
freq=[0:df:fNyq];
kw=0;
sw=zeros(Nsize,1);
tstart=tempo(1:Nsize:N-Nsize); %início da janela móvel
for k=1:Nsize:N-Nsize
    kw=kw+1;%Número da janela
    sw=radG(k+1:k+Nsize,NS+1);
    Fw=fft(sw);AFw=abs(Fw(1:Nsize2+1)/Nsize2);
    Spec(:,kw)=AFw
end

%fprintf(AFw)
%[nlin,ncol]=size(Spec);
figure(6);
pcolor(freq,tstart,Spec);colorbar
xlabel('f (Hz)');
ylabel('time start (s)')
figure; pcolor(periodo,tstart,Spec);colorbar
xlabel('T (s)');
ylabel('time start (s)')
    
asked by anonymous 18.03.2016 / 16:45

0 answers