help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficient submatrix computation or matrix index looping


From: Jordi Gutiérrez Hermoso
Subject: Re: Efficient submatrix computation or matrix index looping
Date: Fri, 20 May 2011 18:15:39 -0500

On 20 May 2011 18:12, fuankarion <address@hidden> wrote:
> Ok, this is the context:
>
> I'm interested in the elements around every element of a matrix (and the
> element itself), say for every element al position i,j I want to get a
> submatrix of the elements at positions:
>
> i-1,j-1    i,j-1    i+1,j-1
>
> i-1,j       i,j      i+1,j
>
> i-1,j+1   i,j+1   i+1,j+1
>
> This is not restricted to 3x3 submatrices, actually I want to get 8x8
> submatrices and 16x16 submatrices arround every element, part of the problem
> is that I have to do this for a large number of matrices.

This isn't context. You just restated the Y problem without mentioning the X.

Are you trying to implement an image filter, for exmaple? I am pretty
sure that your Y problem in general can't be solved efficiently, so I
want more context in order to provide a better solution.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]