close all
clear all
load helidata
normvib=vib/38;
tempvib=vib(1:1:5000);
temprpm=rpm(1:1:5000);
temprpm1=reshape(temprpm,[100 50]);
tempvib1=reshape(tempvib,[100 50]);
AVGRPM=mean(temprpm1);
normrpm=fix(AVGRPM/280);
for i=min(normrpm):1:max(normrpm)
     INDEX{i}=find(normrpm==i);
end
for j=min(normrpm):1:max(normrpm)
     if(~isempty(INDEX{j}))
     [C,L]=wavedec(mean(tempvib1(:,INDEX{j})',1),3,'db1');
     DATA{j}=C;
     else
     DATA{j}=C;
     end
end
I=wcodemat(cell2mat(DATA'),10240)';
imagesc(I)
xlabel('rpm');
ylabel('vibration');
figure
plot(rpm)
xlabel('data sample');
ylabel('rpm');
figure
plot(vib)
xlabel('data sample');
ylabel('vibration');
