imagesc after fft2
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Michal Karwacki
il 15 Dic 2017
Commentato: Image Analyst
il 16 Dic 2017
Hello - im new in here :)
I've got some kind of radar's signal that I want to show with the imagesc() function.
After an fft2 I wanted to show my signal with:
figure; imagesc(abs(tabsygn-mean(y,2)));
It all worked, however when I went to reduce my axis size, something strange happened. It changed the values, however the image itself didn't change. I've used the command below:
imagesc(0:200,250:400,(abs(tabsygn-mean(y,2))));
The image on the left is original, and on the right is after the command above.

3 Commenti
Adam
il 15 Dic 2017
The arguments you pass as x and y to imagesc to not change the image at all, they just give the values for the x and y data to put on the axes.
If you want to clip an image you do this in the normal way, after plotting it, using
doc xlim
doc ylim
or
doc axis
Risposta accettata
Image Analyst
il 15 Dic 2017
Try
yourImage = abs(tabsygn-mean(y,2));
% Extract only rows 150-450 and columns 1-900.
yourImage = yourImage(150:450, 1:900);
4 Commenti
Image Analyst
il 16 Dic 2017
Well, it's a common beginner mistake so you just joined thousands of other who do the same thing all the time.
Beginners think matrices are indexed m(x,y), but they are NOT.
They are indexed m(y, x) because rows are y and columns are x, and it's the rows that come first in the index list.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Resizing and Reshaping Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!