# Image processing matrix image rotation

## Homework Statement

image processing

I would like to rotate an m*n image matrix by any input degree, simplest cases 90, 180 and 270 on matlab without using any of the built in functions i.e. purely mathematical

## The Attempt at a Solution

\left[ \begin{matrix} cos\left(\theta \right) & sin\left(\theta \right) \\ -sin\left(\theta \right) & cos\left(\theta \right) \end{matrix}\right]

is the rotation matrix , how would i apply this to a general case for a m*n matrix?

$$\left[ \begin{matrix} cos\left(\theta \right) & sin\left(\theta \right) \\ -sin\left(\theta \right) & cos\left(\theta \right) \end{matrix}\right]$$