0
$\begingroup$

If I have a matrix

1, 1, 2, 2 1, 2, 2, 3 2, 2, 3, 3 2, 3, 3, 3 

What operation do I need to perform to create a "scaled" version:

1, 1, 1, 1, 2, 2, 2, 2 1, 1, 1, 2, 2, 2, 2, 2 1, 1, 1, 2, 2, 2, 2, 3 1, 1, 2, 2, 2, 2, 3, 3 1, 2, 2, 2, 2, 3, 3, 3 2, 2, 2, 2, 3, 3, 3, 3 2, 2, 2, 3, 3, 3, 3, 3 2, 2, 3, 3, 3, 3, 3, 3 2, 3, 3, 3, 3, 3, 3, 3 

I thought it was a Product. Or is there a vector operation?

  • 0
    Wow, that's a nice link. Those hq*n*x algorithms produce some impressing output. The power of anti-aliasing, I guess. :)2012-04-19

1 Answers 1

1

As mentioned in the comments, I don't see a "mathematical" or "elegant" way to solve this, particularly not by linear transformations (impossible because of rank).

But here is one way it works: Let the original matrix be an $m \times n$ matrix $A$ and the resulting matrix an $s \times t$ matrix $B$. Then define $B_{i,j} := A_{\text{round}(im/s),\text{round}(jn/t)}$.