フィルターのクリア

How to make a polar grid with variable number of angular points?

2 ビュー (過去 30 日間)
Mohamed Abd El Raheem
Mohamed Abd El Raheem 2022 年 2 月 20 日
コメント済み: Matt J 2022 年 2 月 21 日
Greetings...
I am making a grid to discretize a circular disk area for an integration process:
  1. we have the radial variable ρ and the angle ϕ.
  2. Making it using "meshgrid" (even with nonuniform ticks) yields a unnecessary large density of ϕ at small ρ and a poor density of ϕ at large ρ. This affects the convergence of the integral, and capturing the variaion on the disk will require to take inefficient very large grids.
Requirements:
  1. Making the grid on varying density basis. That is, as the value of ρ increases, the number of ϕ samples increase.
  2. The grid should be integrable in MATLAB. I mean, can we use trapz or any built in numerical integration function? Or do it using "sum" in a straight foreward manner?
Thanks in advance for any help.

回答 (1 件)

Matt J
Matt J 2022 年 2 月 20 日
編集済み: Matt J 2022 年 2 月 20 日
I would use integral2() which, for one thing, does not require you to provide a meshgrid of samples. However, remember that with 2D integrals in polar coordinates, you have to multiply the integrand by ρ.
  2 件のコメント
Mohamed Abd El Raheem
Mohamed Abd El Raheem 2022 年 2 月 20 日
編集済み: Mohamed Abd El Raheem 2022 年 2 月 20 日
I don't have a formula to integrate. As I know, integral2 should take a formula through an input function handle.
I have numerical data. The data are generated on the disc area through some calculations, and then need to be integrated numerically.
Matt J
Matt J 2022 年 2 月 21 日
I don't have a formula to integrate. As I know, integral2 should take a formula through an input function handle.
You need a function handle, but that doesn't mean you need a formula. You can supply a handle to a function that interpolates the data.

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

カテゴリ

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