Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Graphics > 2d_plot > fchamp


direction field of a 2D first order ODE

Calling Sequence




An external (function or character string) or a list which describes the ODE.


It can be a function name f, where f is supposed to be a function of type y=f(t,xy [p1,]). f returns a column vector of size 2, y, which gives the value of the direction field f at point xy=[x,y] and at time t.


It can also be an object of type list, list(f,P1,..Pn) where f is a function of type y=f(t,xy,p1, and Pi gives the value of the parameter pi.


The selected time.


Two row vectors of size n1 and n2 which define the grid on which the direction field is computed.


This represents a sequence of statements key1=value1,key2=value2, ... where key1, key2,... can be one of the following: arfact, rect, strf (see below).


Optional arguments, see champ.


fchamp is used to draw the direction field of a 2D first order ODE defined by the external function f. Note that if the ODE is autonomous, argument t is useless, but it must be given.

Enter the command fchamp() to see a demo.


deff("[xdot] = derpol(t,x)",..
        ["xd1 = x(2)";..
         "xd2 = -x(1) + (1 - x(1)**2)*x(2)";..
         "xdot = [ xd1 ; xd2 ]"])
xf= -1:0.1:1;
yf= -1:0.1:1;
deff("[xdot] = derpol(t,x)",..
        ["xd1 = x(2)";..
         "xd2 = -x(1) + (1 - x(1)**2)*x(2)";..
         "xdot = [ xd1 ; xd2 ]"])
xf= -1:0.1:1;
yf= -1:0.1:1;

See Also

  • champ — 2D vector field plot
  • champ1 — 2D vector field plot with colored arrows
Report an issue
<< errbar 2d_plot fcontour2d >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:34:52 CEST 2012