clear clc close all numimages=27; for i=1:numimages-1 file=''; ext='.tif'; name=num2str(5*i); filename=[file name ext]; image=double(imread(filename)); % image=image(1024:1600,700:1500); [x y]=size(image); sample=image(round(x/2),:); % sample=[sample zeros(1,2000)]; fsample=fft(sample); afsample=abs(fsample); mfreq=max(afsample(3:y-2)); index1=find(afsample==mfreq); index=index1(1); rawphase=fsample(index); if real(rawphase)>0 && imag(rawphase)>0 phase(i+1)=atand(imag(rawphase)/real(rawphase)); elseif real(rawphase)>0 && imag(rawphase)<0 phase(i+1)=atand(imag(rawphase)/real(rawphase))+360; elseif real(rawphase)<0 && imag(rawphase)>0 phase(i+1)=atand(imag(rawphase)/real(rawphase))+180; elseif real(rawphase)<0 && imag(rawphase)<0 phase(i+1)=atand(imag(rawphase)/real(rawphase))+180; end end x=0:5:(numimages-1)*5 plot(x,phase) % V1=double(imread('V1//V1_20_1.tif')); % V2=double(imread('V2//V2_67.tif')); % V3=double(imread('V3//V3_100.tif')); % % OG=sqrt(V1.^2+V2.^2+V3.^2); % [x y]=size(V1); % % V1sample=V2(x/2,:); % fV1sample=fft(V1sample); % fV1samplea=abs(fV1sample); % fV1sample(109) % phase=atand(imag(fV1sample(109))/real(fV1sample(109))) % %V1Phase is 341.8593 % %V2Phase is 136.8319