find boundaries in a binary n-dimensions
古いコメントを表示
Hi, I have n-dimension matrix (with n=7) of ones and zeros. There should be a clear cut between the region of ones and region of zeros, and I want to find approximate equation for it (with 7 variables). In other words, I want to find the boundaries of the region with zeros. There are functions for 2D and 3D. Is there anything I can do with nD?
Many thanks
5 件のコメント
Walter Roberson
2017 年 11 月 5 日
What are the input variables to the equations? What form of equation are you hoping for? For example are you looking for something like
(I >= 2 & I <= 5} & J = I*4 + 3 & K = mod(J, 2) + mod(J,5) & ...
Aviad
2017 年 11 月 5 日
Aviad
2017 年 11 月 5 日
Walter Roberson
2017 年 11 月 5 日
If you are looking for volumes, then you can calculate the volume of each matrix entry. This is much easier if the vectors are sampled uniformly; if they are sampled non-uniformly you can do things like saying that the volume runs half way to the next center in that direction -- but if you do that then you run into problems with boundary cells (unless you know that there are no occupied cells on the outside boundary.) Anyhow, calculate the individual volumes through marginal distances, do an element-wise multiplication by the occupation matrix, sum to get total volume.
Walter Roberson
2017 年 11 月 5 日
equations like p1=a*p2^2+b*p3+c*p4+... cannot express boundaries unless you use piecewise(), or you use heaviside() and dirac(), or other discrete functions such as mod() or floor() and ceil()
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!