Programmer Guide/Command Reference/EVAL/yint: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====yint=====
Calculates the integration (differnce quotients) of the vector ''y'' = f(''x'').
----
;Usage 1: <code>yint(<var>y<sub>vector</sub></var> {, <var>dx<sub>scalar</sub></var>=1 {, <var>c<sub>scalar</sub></var>=0}})</code>
;Result 1: The result is the vector ''r'' with <code>nrow(''y'')+1</code>elements.
::<code>''r''[0]=''c''</code>
::<code>''r''[i+1]=''r''[i]+''y''[i]*''dx''; with: i=0..nrow(''y'')-1</code>
----
;Usage 2: <code>yint(<var>y<sub>vector</sub></var> {, <var>dx<sub>scalar</sub></var>=1 {, <var>c<sub>scalar</sub></var>=0}})</code>
;Result 2: The result is the vector ''r'' with <code>nrow(''y'')+1</code>elements.
::<code>''r''[0]=''c''</code>
::<code>''r''[i+1]=''r''[i]+''y''[i]*''dx''[i]; with: i=0..nrow(''y'')-1</code>
----
;Usage 2: <code>yint(<var>y<sub>vector</sub></var> {, <var>x<sub>scalar</sub></var>=1 {, <var>c<sub>scalar</sub></var>=0}})</code>
;Result 2: The result is the vector ''r'' with <code>nrow(''y'')+1</code>elements.
::<code>''r''[0]=''c''</code>
::<code>''r''[i+1]=''r''[i]+''y''[i]*(''x''[i+1]-''x''[i]); with: i=0..nrow(''y'')-1</code>
----
;See also: [[Programmer_Guide/Command_Reference/EVAL/ydiff|ydiff]]


Calculates the integration <code>r</code> of the vector <var>y</var> with <code>nrow(y)+1</code> elements.
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]
 
=====Usage:=====
 
<code>yint(<var>y</var>,<var>dx</var>,<var>c</var>)</code>
 
=====Parameters:=====
 
;<var>y</var>
 
:The y data vector.
 
;<var>dx</var>
 
:The x increment. If <var>dx</var> is not specified, the default value of <code>1</code> is used.
 
;<var>c</var>
 
:The start value (default = 0).
 
=====Result:=====
 
<code>r[0] =</code> <var>c</var><code>, r[i+1] = r[i] +</code> <var>y</var><code>[i]*</code><var>dx</var>
 
with: <code>i = 0</code> .. <code>nrow(y)-1</code>
 
=====Usage:=====
 
<code>yint(<var>y</var>,<var>x</var>,<var>c</var>)</code>
 
=====Parameters:=====
 
;<var>y</var>
 
:The y data vector.
 
;<var>x</var>
 
:The x data vector with <code>nrow(</code><var>y</var><code>)+1</code> elements.
 
;<var>c</var>
 
:The start value (default = 0).
 
=====Result:=====
 
<code>r[0] =</code> <var>c</var><code>, r[i+1] = r[i] +</code> <var>y</var><code>[i]*(</code><var>x</var><code>[i+1]-</code><var>x</var><code>[i])</code>
 
with: <code>i = 0</code> .. <code>nrow(</code><var>y</var><code>)-1</code>

Revision as of 08:56, 13 April 2011

Calculates the integration (differnce quotients) of the vector y = f(x).


Usage 1
yint(yvector {, dxscalar=1 {, cscalar=0}})
Result 1
The result is the vector r with nrow(y)+1elements.
r[0]=c
r[i+1]=r[i]+y[i]*dx; with: i=0..nrow(y)-1

Usage 2
yint(yvector {, dxscalar=1 {, cscalar=0}})
Result 2
The result is the vector r with nrow(y)+1elements.
r[0]=c
r[i+1]=r[i]+y[i]*dx[i]; with: i=0..nrow(y)-1

Usage 2
yint(yvector {, xscalar=1 {, cscalar=0}})
Result 2
The result is the vector r with nrow(y)+1elements.
r[0]=c
r[i+1]=r[i]+y[i]*(x[i+1]-x[i]); with: i=0..nrow(y)-1

See also
ydiff

<function list>

Navigation menu

Personal tools