Create multi-level quadtree using given 128X128 matrix

조회 수: 4 (최근 30일)
BlkHoleSun
BlkHoleSun 2019년 2월 27일
As mentioned in the title, I need to make a quadtree from a 128X128 matrix, we'll call it 'A', where the parent is the sum of all values in 'A'. The children of the parent are the 4 summed values of A1 = A(1:64,1:64), A2 = A(1:64,65:128), A3 = A(65:128,1:64) and A4 = A(65:128,65:128). Of course each child is also a parent with 4 values and so on...here's a pic of what I'm describing.
quad_tree.gif
I can do this the long and hard way by individually typing in every level, but this is not reasonable. I would appreciate any help in automating the building of this quadtree data structure. I have attached the 128X128 matrix (Wu.mat)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Attributes and Indexing에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by