fieldlines
Version 1.0.0.0 (2.18 KB) by
Avni Pllana
Plots a field line with the initial point P(x0,y0) for a 2D-field.
Plots a field line with the initial point P(x0,y0) for a 2D-field given by an equaly spaced grid of positions and corresponding field components. The function employs the 4th order Runge-Kutta method.
Example:
[x,y] = meshgrid(-2:.2:2,-1:.15:1);
z = x .* exp(-x.^2 - y.^2);
[px,py] = gradient(z,.2,.15);
quiver(x,y,px,py), axis image,
hold on
fieldlines(x,y,px,py,-0.7,0.2)
Cite As
Avni Pllana (2024). fieldlines (https://www.mathworks.com/matlabcentral/fileexchange/5710-fieldlines), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R11
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Vector Fields >
Find more on Vector Fields in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |