function [meanv,medianv,stdv,vv] = ExplainedVariancesNewsBand(bootcholimpulse,bootsignimpulse, intvar)
a = bootcholimpulse;
b = bootsignimpulse;
vva = zeros(length(intvar),size(a,2),size(a,4));
vvb = zeros(length(intvar),size(a,4));

lo = 2;%.5;
hi = 8;%200
for k = 1:length(intvar)
    for i = 1:size(a,2)
        %size(squeeze(a(intvar(k),i,:,:)))
        %size(BandVar(squeeze(a(intvar(k),i,:,:)), lo, hi, 4, 50))
        
        [vva(k,i,:) spec(:,i)] =  BandVar(squeeze(a(intvar(k),i,:,:)), lo, hi, 4, 50);
    end
    [vvb(k,:) spec_k,lambda] =  BandVar(squeeze(b(intvar(k),:,:))', lo, hi, 4, 50);
    
    %figure;plot(lambda,[spec_k'/pi sum(spec,2)/pi])
    %figure;plot(lambda,[spec_k'/pi 0*sum(spec,2)/pi])
end
%size(spec)
%size(spec_k)
%figure;a=plot(lambda,[spec_k' spec(:,1) spec(:,2:end) sum(spec,2)]);set(a(1),'Marker','o');set(a(2),'LineStyle','--');
%sum(sum(spec,2))*.1037/pi
%sum(spec_k,2)*.1037/pi

vv = vvb./squeeze(sum(vva,2));
medianv = squeeze(median(vv,2));
meanv = squeeze(mean(vv,2));
stdv = squeeze(std(vv,0,2));
