Graph of a 2D vector field equation and its divergence

Visualize vector field using quiver and divergence using filled contour at given 2D coordinates

Vous suivez désormais cette soumission

%% Divergence of Vector Function with 2 Independent Variables
% by Prof. Roche C. de Guzman

%% Given
f = @(x,y) [(-4*x).*exp(-(x.^2)-y.^2); (-4*y).*exp(-(x.^2)-y.^2)]; % anonymous fx: f(x,y)
xi = -2; xf = 1; yi = -2; yf = 1; n = 10; % independent variables: initial and final values, and number of elements

Citation pour cette source

Roche de Guzman (2026). Graph of a 2D vector field equation and its divergence (https://fr.mathworks.com/matlabcentral/fileexchange/69287-graph-of-a-2d-vector-field-equation-and-its-divergence), MATLAB Central File Exchange. Extrait(e) le .

Catégories

En savoir plus sur Vector Fields dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
2.0.1

Updated image.

2.0.0

Better example of a vector function

1.0.0