pcolor with complex data
Show older comments
my all code is this:
a=imread('plus_white.gif');
[m n]=size(a);
lambda=600e-9;
f=16.5e-9;
w=4e-3;
k = (fftshift(fft2(a))).^2;
x = linspace(-lambda*f*n/(2*w), lambda*f*n/(2*w), n);
y = linspace(-lambda*f*m/(2*w), lambda*f*m/(2*w), m);
pcolor(x,y,k);
the code is taken from Stephen Schultzs' Using MATLAB to compute diffraction patterns of complex apertures.
??? Error using ==> pcolor at 62 Data inputs must be real.
k is like that 2.645177387196637e+02 + 2.156307053870210e+02i I don't want to loose my data by changing it int type what i can do for it?
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!