필터 지우기
필터 지우기

How do I quiver plot magnetic field

조회 수: 7 (최근 30일)
matlabkid602
matlabkid602 2017년 7월 4일
댓글: José-Luis 2017년 7월 5일
I have the following code that will calculate the magnetic field from a stationary dipole in three dimensions:
function B = B_function_quiverplot(x,y,z)
%r_b vector from origin to gradiometer reading %r_m vector from origin to magnetisation mass %m is the magnetisation vector %% b0=[-.4e3 18.3e3 -45.8e3]; %earth field in nT r=[x;y;z] const = 1.2566e-6/(4*pi); m=(.2/const)*b0 %Evaluating B
dot_rm=dot(r,m); norm_r=norm(r)
B= const*( ((3*dot_rm)/(norm_r^5))*r - (1/(norm_r^3))*m)
end
How can I produce a 3-d quiver plot of the vector field?

답변 (1개)

José-Luis
José-Luis 2017년 7월 4일
You could use quiver3().
  댓글 수: 4
matlabkid602
matlabkid602 2017년 7월 4일
I would like to see field lines that look like this but for a magnetic dipole, but in three dimensions.
https://scicomp.stackexchange.com/questions/21470/plot-vector-field-in-matlab
José-Luis
José-Luis 2017년 7월 5일
That's what quiver3() does.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by