Numerically Integrate two vector values to produce a vector output.

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일

0 개 추천

Are you looking for cumtrapz?

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

제품

질문:

2012년 12월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by