L=90;
M=90;
T=csvread('read.csv');
f=abs(fftshift(fft2(T)));
a=-L/2*0.12:0.12:0.12*L/2;
b=-M/2*0.20:0.20:0.20*M/2;
t=(a.^2-b.^2)/(2.*a);
f_t=20*log10(f);
figure
imagesc(t,b,f_t)
grid on
axis equal
title('after shift')
axis tight
colormap (hot);
figure
imagesc(a,b,f_t)
grid on
axis equal
axis tight
title('before shift')
colormap (hot);
if my data is shifted wrt t then the place from where the data is shifted towards the positive axis that place should be white blocks

댓글 수: 3

Image Analyst
Image Analyst 2023년 1월 15일
Not sure what the error is. I don't see any. You take the fft and then shift it with fftshift() so that the DC origin in the center of the image, which it is in both cases. For the second case, you merely change the x labels. So while the original DC element occurred at t=3 it now occurs around t=1. You say you think "the place from where the data is shifted towards the positive axis that place should be white blocks" meaning that the block at 3 (where it was shifted from) should be white. Well it is. The white block is in the 4th column in both cases, of course because all you did was to change the x tick labels. So in the first case it's in column 4 with t=3, and in the second case it's in column 4 with t = 1. It's doing what you told it to do and I don't see the "error".
prabhu singh
prabhu singh 2023년 1월 15일
but with other data why i am not able to see white box..bcoz other data is also shifted at the same time
Image Analyst
Image Analyst 2023년 1월 15일
I don't know. You didn't post/attach the other data.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품

릴리스

R2021a

태그

질문:

2023년 1월 15일

댓글:

2023년 1월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by