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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 8: Line 8:
----
----
;Usage 2: <code>yint(<var>y<sub>vector</sub></var> {, <var>dx<sub>vector</sub></var>=1 {, <var>c<sub>scalar</sub></var>=0}})</code>
;Usage 2: <code>yint(<var>y<sub>vector</sub></var> {, <var>dx<sub>vector</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.  
;Result 2: The result is the vector ''r'' with <code>nrow(''y'')+1</code> elements. The argument ''dx'' contains the differences of the x values and is a vector with <code>nrow(''y'')</code> elements.
::<code>''r''[0]=''c''</code>
::<code>''r''[0]=''c''</code>
::<code>''r''[i+1]=''r''[i]+''y''[i]*''dx''[i]; with: i=0..nrow(''y'')-1</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>vector</sub></var>=1 {, <var>c<sub>scalar</sub></var>=0}})</code>
;Usage 2: <code>yint(<var>y<sub>vector</sub></var> {, <var>x<sub>vector</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.  
;Result 2: The result is the vector ''r'' with <code>nrow(''y'')+1</code> elements. The argument ''x'' contains the x values and is a vector with <code>nrow(''y'')+1</code> elements.
::<code>''r''[0]=''c''</code>
::<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>
::<code>''r''[i+1]=''r''[i]+''y''[i]*(''x''[i+1]-''x''[i]); with: i=0..nrow(''y'')-1</code>

Revision as of 08:59, 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)+1 elements.
r[0]=c
r[i+1]=r[i]+y[i]*dx; with: i=0..nrow(y)-1

Usage 2
yint(yvector {, dxvector=1 {, cscalar=0}})
Result 2
The result is the vector r with nrow(y)+1 elements. The argument dx contains the differences of the x values and is a vector with nrow(y) elements.
r[0]=c
r[i+1]=r[i]+y[i]*dx[i]; with: i=0..nrow(y)-1

Usage 2
yint(yvector {, xvector=1 {, cscalar=0}})
Result 2
The result is the vector r with nrow(y)+1 elements. The argument x contains the x values and is a vector with nrow(y)+1 elements.
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