User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Cumtrapz Page [1]  
ThePeter
TWW CHAMPION
37709 Posts
user info
edit post

http://www.mathworks.com/help/techdoc/ref/cumtrapz.html

Quote :
"cumtrapz - Cumulative trapezoidal numerical integration
Syntax

Z = cumtrapz(Y)
Z = cumtrapz(X,Y)
Z = cumtrapz(X,Y,dim) or cumtrapz(Y,dim)
Description

Z = cumtrapz(Y) computes an approximation of the cumulative integral of Y via the trapezoidal method with unit spacing. To compute the integral with other than unit spacing, multiply Z by the spacing increment. Input Y can be complex.

For vectors, cumtrapz(Y) is a vector containing the cumulative integral of Y.

For matrices, cumtrapz(Y) is a matrix the same size as Y with the cumulative integral over each column.

For multidimensional arrays, cumtrapz(Y) works across the first nonsingleton dimension.

Z = cumtrapz(X,Y) computes the cumulative integral of Y with respect to X using trapezoidal integration. X and Y must be vectors of the same length, or X must be a column vector and Y an array whose first nonsingleton dimension is length(X). cumtrapz operates across this dimension. Inputs X and Y can be complex.

If X is a column vector and Y an array whose first nonsingleton dimension is length(X), cumtrapz(X,Y) operates across this dimension.

Z = cumtrapz(X,Y,dim) or cumtrapz(Y,dim) integrates across the dimension of Y specified by scalar dim. The length of X must be the same as size(Y,dim).
Examples
Example 1

Y = [0 1 2; 3 4 5];

cumtrapz(Y,1)
ans =
0 0 0
1.5000 2.5000 3.5000

cumtrapz(Y,2)
ans =
0 0.5000 2.0000
0 3.5000 8.0000

Example 2

This example uses two complex inputs:

z = exp(1i*pi*(0:100)/100);

ct = cumtrapz(z,1./z);
ct(end)
ans =
0.0000 + 3.1411i
"

2/29/2012 8:32:33 AM

Krallum
56A0D3
15294 Posts
user info
edit post

Could you bold out the good parts?

I'm Krallum and I approved this message

2/29/2012 9:04:55 AM

settledown
Suspended
11583 Posts
user info
edit post

got 'em

2/29/2012 9:05:28 AM

pttyndal
WINGS!!!!!
35217 Posts
user info
edit post

thread was not what I expected

2/29/2012 9:07:37 AM

justinh524
Sprots Talk Mod
27740 Posts
user info
edit post

I thought this thread was about all your female relatives.

2/29/2012 12:24:53 PM

 Message Boards » Chit Chat » Cumtrapz Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.