As schorsch said in comments, simply do:
A=M(160:430,108:305)
to get values
then modify your sample ( B=transform(A)
)
and put B in the same way you got A out
M(160:430,108:305)=B
Remember that : basically means everything in between
I agree with Mark though, the documentation for MATLAB is outstanding and one of MATLAB’s best features compared to open source, utilize it please.
solved Getting one section of a larger matrix matlab