How to represent a 2D vector field in a way that will allow vectorial calculations (dot product)

조회 수: 1 (최근 30일)
Hello,
I'm trying to calculate the magnetic field created by a point dipole at an XY plane at some distance, the formula is as follows:
I have a 3x1 vector representing the magnetic dipole, and 3 N*N matrices for my grid: XGrid, YGrid, ZGrid.
The XY matrices were created using the meshgrid function and the ZGrid is a "constant" number that is the distance of the plane.
I can do something like: "r = cat(3, XGrid, YGrid, ZGrid)" and get a 60x60x3 array, but I am hoping for some method which will allow me to simply write afterwards "m.*r" or "m*r" and it'll return me a 60x60x3 array of the result.

답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by