Dipole magnetic field B0 = vb_dipole_mag(J0,x0,X,Q) Áж˻Ҽ§¾ì·×»» x0 ¤ÎÁÐ¶Ë»Ò J0 ¤¬ ´Ñ¬ÅÀ X ¤Ëºî¤ë¼§¾ì¤Î Q Êý¸þ¼Í±Æ B0 = Q*(JJ x Xd)/|Xd|^3 , Xd = X - x0 2004-02-06 Taku Yoshioka 2004-12-26 M. Sato modified Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function B0 = vb_dipole_mag(J0,x0,X,Q) 0002 % Dipole magnetic field 0003 % B0 = vb_dipole_mag(J0,x0,X,Q) 0004 % Áж˻Ҽ§¾ì·×»» 0005 % x0 ¤ÎÁÐ¶Ë»Ò J0 ¤¬ ´Ñ¬ÅÀ X ¤Ëºî¤ë¼§¾ì¤Î Q Êý¸þ¼Í±Æ 0006 % B0 = Q*(JJ x Xd)/|Xd|^3 , Xd = X - x0 0007 % 0008 % 2004-02-06 Taku Yoshioka 0009 % 2004-12-26 M. Sato modified 0010 % 0011 % Copyright (C) 2011, ATR All Rights Reserved. 0012 % License : New BSD License(see VBMEG_LICENSE.txt) 0013 0014 Xd = [X(:,1)-x0(1), X(:,2)-x0(2), X(:,3)-x0(3)]; 0015 dd = sum( Xd.^2, 2 ); 0016 Rx = sqrt(dd).*dd; 0017 0018 % ³°ÀÑ·×»» JJ x Xd 0019 JB = [J0(2).*Xd(:,3) - J0(3).*Xd(:,2), ... 0020 J0(3).*Xd(:,1) - J0(1).*Xd(:,3), ... 0021 J0(1).*Xd(:,2) - J0(2).*Xd(:,1)]; 0022 0023 B0 = sum( JB.*Q, 2 )./Rx;