If I have a matrix
>> M=[0 0 1 1 0 ]
M =
0 0 1 1 0
and resize it
>> imresize(M,[1,size(M,2)*2])
I get an answer
ans =
0 -0.0234 -0.0703 0.2031 0.7969 1.0938 1.0938 0.7969 0.2031 -0.0703
My original array did not have any value less than 0 or greater than 1. How come it contains values greater than 1 or values lesser than 0?
I assume that your question was, "How come that the outcome of interpolation can be larger or smaller than the maximal or minimal value of the original signal".
The answer is that it depends on your interpolation type. For instance, if you do nearest-neighbor interpolation, it will not happen:
imresize(M,[1,size(M,2)*2],'nearest')
ans =
0 0 0 0 1 1 1 1 0 0
It will not happen in bilinear as well:
imresize(M,[1,size(M,2)*2],'bilinear')
ans =
0 0 0 0.2500 0.7500 1.0000 1.0000 0.7500 0.2500 0
It does happen in bicubic interpolation, which is the default:
imresize(M,[1,size(M,2)*2],'bicubic')
That is indeed one of the properties of bicubic interpolation. To understand why it happens, take a look at the one-dimensional case (cubic interpolation):