File Exchange

image thumbnail

Graph of a 3D vector field and its divergence and curl

version 2.0.1 (2.64 KB) by Roche de Guzman
Visualize vector field quiver, divergence (slice), and curl (quiver) at given 3D coordinates

3 Downloads

Updated 23 Feb 2019

View License

%% Divergence and Curl of Vector Function with 3 Independent Variables
% by Prof. Roche C. de Guzman

%% Given
f = @(x,y,z) [-2*y; x; z/10]; % anonymous fx: f(x,y)
xi = -2; xf = 2; yi = -1; yf = 1; zi = 0; zf = 3; n = 5; % independent variables: initial and final values, and number of elements

Cite As

Roche de Guzman (2019). Graph of a 3D vector field and its divergence and curl (https://www.mathworks.com/matlabcentral/fileexchange/69282-graph-of-a-3d-vector-field-and-its-divergence-and-curl), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

Updates

2.0.1

Updated image.

2.0.0

Better vector function for demonstrating curl.

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor