Numerical Integration using intgrad3

1 回表示 (過去 30 日間)
newbie
newbie 2020 年 3 月 10 日
回答済み: darova 2020 年 3 月 11 日
Hi,
I am trying to calculate the surface from gradient. And I am using intgrad3 get there. The function runs without throwing an error but the surface doesnot look normal to the gradient. Also the values in the ouptut produced by intgrad3 are way higher than what I expect. I realize this may be because of the constant of integration but the range is high too. Any ideas of what I might be doing wrong?
Here is the data and the function:
  2 件のコメント
darova
darova 2020 年 3 月 10 日
Do you have another data (not so large) ? I don't know if my computer can handle it
The question is unclear: what are you trying to do? Calculate area?
newbie
newbie 2020 年 3 月 10 日
I want to generate a surface that is locally normal to the gradient field. Here is the new data, you can run the code without the second input (it is only used for visualization), it will throw an error but after calculating the surface.
The raw data is the positions of cells in 3D. Each 3D cell has a centroid position (x,y,z) in each z-layer. I calculate the direction vectors of each cell and am trying to generate a surface that is normal to these direction vectors.

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

回答 (1 件)

darova
darova 2020 年 3 月 11 日
If i understood you correctly: you have normal vector and want to rebuild surface
So for each vector you can create small plane as below
all you have to do is place that plane in appropriate Z coordinate
I used cumsum to calculate cumulative sum
results

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by