trapz problem with multiple variables

9 ビュー (過去 30 日間)
NF Hami
NF Hami 2017 年 9 月 25 日
編集済み: Torsten 2017 年 9 月 25 日
I need to integrate my function, written in phyton 'trapz(Vz, Vt, r^2,r)/trapz(Vz^2,r,r)' that contains multiple variables with respect to r. I tried to solve it in Matlab using trapz function as well but there was an error when I tried to write in matlab for denominator 'trapz(r,trapz(r,Vz^2))'- I think this is for double integration and definitely wrong and have no idea how to do for the numerator.
Can someone help me with this function so that I can have the same solution in Matlab. Vz and Vt are changing values for each r position, and r is from -92 to 92. However, the interval between r is unequally distributed, where r = [92,87,82,77,67,52,37,22,7,0,-7,-22,...,-92].
Thanks.
  2 件のコメント
KSSV
KSSV 2017 年 9 月 25 日
Show the complete code which you have tried.
Torsten
Torsten 2017 年 9 月 25 日
編集済み: Torsten 2017 年 9 月 25 日
Please show the integrals you are trying to approximate by the "trapz"-command in a mathematical notation.
Best wishes
Torsten.

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

回答 (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