|
raj <rajkrai@gmail.com> wrote in message <87d84b3f-1341-442d-af41-a7ec76649edd@e18g2000yqc.googlegroups.com>...
> Hi all,
> I have values in location of 2D plane as follows.
>
> p11 p12 p13 p14 p15
> p21 p22 p23 p24 p25
> p31 p32 p33 p34 p35
> p41 p42 p43 p44 p45
> p51 p52 p53 p54 p55
>
> Now I want to filter the data from [5x5] matrix to [3x3] matrix in the
> location of
> p11 p13 p15
> p31 p33 p35
> p51 p53 p55
>
> Is there any function that takes care of this in Matlab? How does this
> decimation work?
>
> I appreciate your hints and helps in advance.
>
> -rAj
---------------------------------------------------------------------
See ‘Help’ ‘Matrix Indexing’.
To illustrate:
p = rand(5)
q = p(1:2:5, 1:2:5)
|