フィルターのクリア

Integration of scattered data

4 ビュー (過去 30 日間)
PJ
PJ 2013 年 3 月 1 日
Hello,
I'm having the following problem: I'm using TriScatteredInterp to interpolate discrete points.
vq=TriScatteredInterp([x(:),y(:),z(:)],p_abs(:),'natural')
i.e. the value at (x1,y1,z1) can be evaulated with vq(x1,y1,z1).
I would like to integrate this value over the thickness, e.g. at x=0, y=0.
f=@(z)vq(0,0,z);
quad(f,0,1)
I get the following error:
Error using TriScatteredInterp/subsref
The input data has inconsistent size.
Error in @(z)vq(0,0,z)
Error in quad (line 76)
y = f(x, varargin{:});
Error in fit_press_test_3d (line 30)
quad(f,0,1)
Integration with trapz gives the same error.

採用された回答

ChristianW
ChristianW 2013 年 3 月 1 日
vq(scalar,scalar,vector) doesnt work.
f=@(z)vq(zeros(size(z)),zeros(size(z)),z);
  1 件のコメント
PJ
PJ 2013 年 3 月 5 日
Thank you !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by