Programmer Guide/Command Reference/EVAL/yint: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
::<code>''r''[i+1]=''r''[i]+''y''[i]*''dx''; with: i=0..nrow(''y'')-1</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> | ;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. | ||
::<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> | ;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. | ||
::<code>''r''[0]=''c''</code> | ::<code>''r''[0]=''c''</code> |
Revision as of 07: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)+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.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.r[0]=c
r[i+1]=r[i]+y[i]*(x[i+1]-x[i]); with: i=0..nrow(y)-1
- See also
- ydiff