Re: [R] Hadamard transformation

2023-09-18 Thread mohan radhakrishnan
Hello, It really helped. Thanks. On Mon, Sep 18, 2023 at 11:46 PM Rui Barradas wrote: > Às 18:45 de 18/09/2023, mohan radhakrishnan escreveu: > > Hello, > > > > I am attempting to port the R code which is an answer to > > >

Re: [R] Hadamard transformation

2023-09-18 Thread Rui Barradas
Às 18:45 de 18/09/2023, mohan radhakrishnan escreveu: Hello, I am attempting to port the R code which is an answer to https://codegolf.stackexchange.com/questions/194229/implement-the-2d-hadamard-transform function(M){for(i in 1:log2(nrow(M)))T=T%x%matrix(1-2*!3:0,2)/2; print(T); T%*%M%*%T}

[R] Hadamard transformation

2023-09-18 Thread mohan radhakrishnan
Hello, I am attempting to port the R code which is an answer to https://codegolf.stackexchange.com/questions/194229/implement-the-2d-hadamard-transform function(M){for(i in 1:log2(nrow(M)))T=T%x%matrix(1-2*!3:0,2)/2; print(T); T%*%M%*%T} The code, 3 inputs and the corresponding outputs are