Documentation

qtsetblk

Set block values in quadtree decomposition

Syntax

J = qtsetblk(I, S, dim, vals)

Description

J = qtsetblk(I, S, dim, vals)replaces eachdim-by-dimblock in the quadtree decomposition ofIwith the correspondingdim-by-dimblock invals.Sis the sparse matrix returned byqtdecomp; it contains the quadtree structure.valsis adim-by-dim-by-karray, wherekis the number ofdim-by-dimblocks in the quadtree decomposition.

Class Support

Ican be of classlogical,uint8,uint16,int16,single, ordouble.Sis of classsparse.

Examples

I = [1 1 1 1 2 3 6 6 1 1 2 1 4 5 6 8 1 1 1 1 10 15 7 7 1 1 1 1 20 25 7 7 20 22 20 22 1 2 3 4 20 22 22 20 5 6 7 8 20 22 20 20 9 10 11 12 22 22 20 20 13 14 15 16]; S = qtdecomp(I,5); newvals = cat(3,zeros(4),ones(4)); J = qtsetblk(I,S,4,newvals)

Tips

The ordering of the blocks invalsmust match the columnwise order of the blocks inI. For example, ifvalsis 4-by-4-by-2,vals(:,:,1)contains the values used to replace the first 4-by-4 block inI, andvals(:,:,2)contains the values for the second 4-by-4 block.

See Also

|

Introduced before R2006a

Was this topic helpful?