Fastest way to 'frame' a matrix

vade's icon

Hello

Im wondering if this patch is the fastest (only?) way to 'frame' one
matrix within another.

basically, I want put borders around a matrix. one matrix centered
within another.

Jit.op normalizes the dimensions of the second smaller matrix, and im
sure one could finagle something with srcdim/dstdim, but im not
'getting' it. Can anyone show me an alternative?

thanks,

Max Patch
Copy patch and select New From Clipboard in Max.

v a d e //

www.vade.info
abstrakt.vade.info

Andrew Benson's icon

jit.expr @expr "(abs(snorm[0])

vade's icon

Hrm, Andrew, thanks. This is actually a bit slower for me, and not
quite what I need. THis is resizing the incoming matrix to 90% of its
size internally (re-scaling/sampling), and then passing it out.

I need to be able to take 2 matrixes, one larger, and center the
smaller on top of it, with the frame of the first larger visible
around the smaller second one.

I re-did the expr to jit.expr @expr "(abs(snorm[0])
[1])
slower to me, and I cant guarantee that I am not re-sampling the
smaller matrix (which i dont want to do)

so, any way to not resample, simply overlay a smaller matrix on top
of a larger?

thanks again!

v a d e //

www.vade.info
abstrakt.vade.info

John Dekron's icon

Maybe something like this- depends what exactly you want to achieve. John.

Max Patch
Copy patch and select New From Clipboard in Max.

vade's icon

we have a winner.

thanks, I keep getting confused with srcdim and dstdim with the
matrix. this is exactly what I want.

mad props++;

v a d e //

www.vade.info
abstrakt.vade.info