4.0

4.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 2.18 KB File ID: #5710

fieldlines

by Avni Pllana

 

14 Aug 2004 (Updated 18 Aug 2004)

Plots a field line with the initial point P(x0,y0) for a 2D-field.

| Watch this File

File Information
Description

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)

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
2d, field(2), graphics, lines, plotting, specialized
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
12 Apr 2006 Victor Noname

it doesn't plot field lines, it plots field vectors.

18 Aug 2004 N/A N/A  

Contact us