Can you edit a pcolor plot after generating one?

Hopefully an easy question here. I am using pcolor's interpolation option to give me a map of a fourier transform (FT) of an NxN matrix of values.
N is chosen to be even, so interpolation fills in the coordinates in the dead center of the plot with the surrounding points (so for N=2 the center of the plot would be an interpolation between the 4 inputs of the matrix). I want to subtract out the center since this will be very high in magnitude, but I do not have this explicit value before hand.
Is there a way to apply a high pass filter to a FT before plotting it, or can I obtain a set of data points from pcolor which allows me to get rid of the central bit. Any other suggestion would work too!
If you'd like a plot, let me know too. I think the issue should be reasonably clear here though. Thanks!

6 Commenti

Are you passing in x and y coordinates, or are you defaulting to equally spaced? If you are passing in x y are they irregularly spaced?
I'm just taking the matrix elements as my (x,y) pair. I think of it as a function, f, defined by a matrix M in the following way:
Thus, everything is spaced regularly. I FT this guy and use pcolor there, but the center is interpolated since the center is at ([N-1]/2,-[N-1]/2), but would be the sum of all elements of M (taking r to equal zero at the center). Typically you subtract this out, so other features of the plot are apparent, which is what I am trying to do.
If you subtract off the mean() of the signal before FT, then the DC component will be zero and your problem should go away it would seem.
Using the image icon (one left of chain link in INSERT menu section) to attach an image; sample dataset as .mat file would let somebody else play if there's really more to it than this.
The .fig keeps crashing the website.... Think there is a bug in my Matlab somewhere. It was hard to center this since the zoom in tool was of setting itself by about 3 inches from where I wanted it too.
Don't attach a .fig; use "SaveAs" and (say) pick .jpg and attach the resulting image file.
We really can't do much seriously w/o at least the code to look at of what you've done and if you have expectations of real feedback, attach the .mat file with the data so somebody can do something with it other than just look.
Did you do as suggested and remove mean from the input before FT?

Accedi per commentare.

 Risposta accettata

conv2() your 2d matrix with ones(2,2)/4 and use the option 'valid' on the call. Now access the center element of that matrix and subtract it from the matrix. Now imagesc() the resulting matrix.

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by