[R-sig-Geo] selection a right number in a sequance for a RS filter sampling
Clint Bowman
clint at ecy.wa.gov
Thu Feb 25 21:49:43 CET 2010
If I understand the sequence, you want the odd columns from the odd
rows and the even columns from the even rows to "a" and the
remainder go to "b". Once you have a transposed matrix, the recipe
looks straightforward.
Clint
--
Clint Bowman INTERNET: clint at ecy.wa.gov
Air Quality Modeler INTERNET: clint at math.utah.edu
Department of Ecology VOICE: (360) 407-6815
PO Box 47600 FAX: (360) 407-7534
Olympia, WA 98504-7600
On Thu, 25 Feb 2010, gianni lavaredo wrote:
> dear Researcher
>
> Sorry that I know this is not the right email-list and this is a basic help
> but I am doing a remotesensing filter and I am honest, I have no idea how I
> can do this.
> I have a sequance form 1 to 16
>
> > seq(1:16)
> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
>
> and I wish to select this combination in a vector
> a <- c(1,3,6,8,9,11,14,16)
> b <- c(2,4,5,7,10,12,13,15)
>
> following the below example
>
>> t(matrix(data = seq(1:16), nrow = 4, ncol = 4))
> [,1] [,2] [,3] [,4]
> [1,] 1 2 3 4
> [2,] 5 6 7 8
> [3,] 9 10 11 12
> [4,] 13 14 15 16
>
> gianni
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list