The above are my script to calculate chirality However, all Ex,Ey,Ez,Hx,Hy,Hz are complex number, but I already to transfer to real number. Should I use complex or real? Any error in syntax?
As far as I can see, the equation you show does not contain any divergence operations. One term is the scalar (dot) product of the electric field, E, by its curl, and the other term the same with the magnetic field, B. I see no divergence here. The divergence of the curl would imply the presence of second partial derivatives and there are none in the equation. In any case, the divergence of the curl of any vector field would always be identically zero.
Sorry about the unclear question. In fact, I wanna to show that DIV of CURL of vector should be zero, so that it can ensure my syntax is correct. One more question is that if all Ex,Ey,Ez,Hx,Hy,Hz are complex number, the above result will still get zero?
Yes, the divergence of the curl of a vector field with continuous second derivatives with respect to position coordinates will always be zero even if this vector field is complex-valued.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.