フィルターのクリア

double integral and fitted functions

2 ビュー (過去 30 日間)
Daniel
Daniel 2013 年 7 月 9 日
Hi guys,
I have two fitted functions a(t)and b(t). Both via splines. I need to compute an integral:
integral(func,0,1)
where func=a(u)*integral(b(t),0,u).
I know that I can do integrate(cf,0,1) for a fitted object. But how can I compute a double integral?
Thanks.
Daniel.
  1 件のコメント
Daniel
Daniel 2013 年 7 月 9 日
Pleease, help me!

サインインしてコメントする。

回答 (1 件)

Mike Hosea
Mike Hosea 2013 年 7 月 9 日
I'm going to treat this like a homework problem. You'll need to define some anonymous functions. For example, if b is a pp-form, you can create a function that evaluates b by
bfun = @(x)ppval(b,x);
and
bint = @(u)integral(bfun,0,u);
Then you can build up to the point where you can define func. There's more to know, e.g. about "vectorizing" bint with ARRAYFUN before using it, or choosing the 'Arrayvalued' option in the outer integral. You can find some threads on that. But first you need to get started by understanding how to define anonymous functions in MATLAB.

カテゴリ

Help Center および File ExchangeSpline Postprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by