PacketData_7000
x=complex(chanEstsI, chanEstsQ);
hold off
% Plot Video Figure 1
fig1=figure(1);
[packets y]=size(x);
rect = get(fig1,'Position');
rect(1:2) = [0 0];
clear mex
mov = avifile('C:\Documents and Settings\Administrator\Desktop\plotter\fig1.avi', 'compression', 'none');
for i=1:packets
    %Good Indices
    if (pkStatus(i)==1)
        plot(fftshift(10*log10(real(x(i,:)).^2 + imag(x(i,:)).^2)-2*(chanBB(i,:) * ones(1,64))-15*(chanRF(i,:) * ones(1,64) - 1)).','k','LineWidth',1)
    else %Totally not goodIndices
        plot(fftshift(10*log10(real(x(i,:)).^2 + imag(x(i,:)).^2)-2*(chanBB(i) * ones(1,64))-15*(chanRF(i,:) * ones(1,64) - 1)).','r','LineWidth',2)
    end
    grid on
    axis([0 70 -85 -45]);
    %set(h,'EraseMode','xor');
    F = getframe(fig1, rect);
    mov = addframe(mov,F);
end
mov = close(mov);

% Plot Video Figure 2
fig2=figure(2);
rect = get(fig2,'Position');
rect(1:2) = [0 0];
clear mex
mov = avifile('C:\Documents and Settings\Administrator\Desktop\plotter\fig2.avi', 'compression', 'none');
for i=1:packets
    plot(fftshift(10*log10(real(x(i,:)).^2 + imag(x(i,:)).^2)-2*(chanBB(i,:) * ones(1,64))-15*(chanRF(i,:) * ones(1,64) - 1)).');
    grid on
    axis([0 70 -85 -45]);
    %set(h,'EraseMode','xor');
    F = getframe(fig2, rect);
    mov = addframe(mov,F);
end
mov = close(mov);