Numerically Integrate two vector values to produce a vector output.

4 次查看(过去 30 天)
I have two vectors a, and t. I need a vector answer c.
c(T) = integral of a(b) with respect to t (dt), between T and 0.
And i need c(T) to be in vector form. I've tried trapz, but this obly gives me a single value. And i cant use the 'quad', or 'intergral' function, as i do not have an imput function. (Or cannot figure out how to create a function for this that works).
I am getting my a, and t, values from another function.
Help please.
  1 个评论
Mark Whirdy
Mark Whirdy 2012-12-16
编辑:Mark Whirdy 2012-12-16
can you provide some sample code to set up a small-scale version of your problem? I'm having trouble understanding how (i.e. in what context) the output of an integration could/should be a vector.

请先登录,再进行评论。

采纳的回答

Jan
Jan 2012-12-16
Are you looking for cumtrapz?

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by