- #1
hokhani
- 504
- 8
The program below gives "error=4 7" unexpectedly while all the arrays of "real" are 1! I would be grateful for any help.
Code:
kky=pi/(2*10000):pi/10000:1/658;
ky=[-fliplr(kky) kky];
kx=sqrt((1/658)^2-ky.^2);
expiphi_1=(658/1)*(kx+i*ky);
real=expiphi_1.*conj(expiphi_1)
error=find(real~=1)