Fastest way to 'frame' a matrix

    May 19 2006 | 4:28 pm
    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?
    max v2;
    v a d e //

    • May 19 2006 | 4:50 pm
      jit.expr @expr "(abs(snorm[0])
    • May 19 2006 | 6:07 pm
      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 //
    • May 19 2006 | 6:41 pm
      Maybe something like this- depends what exactly you want to achieve. John.
      max v2;
    • May 19 2006 | 6:58 pm
      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 //