[R] fractals

Robin Hankin r.hankin at auckland.ac.nz
Mon Aug 12 22:31:04 CEST 2002


Hi everyone.  

Try:

R>  image(sylvester.matrix(9,pattern=cbind(c(1,0),c(1,1))))

where 

R> sylvester.matrix <- function (n, pattern = rbind(c(1, 1), c(1, -1))) 
{
    n <- as.integer(n)
    stopifnot(n >= 0)
    if (n == 0) {
        return(as.matrix(1))
    }
    else {
        return(kronecker(pattern, sylvester.matrix(n - 1, pattern)))
    }
}


-- 

Robin Hankin, Lecturer,
School of Geography and Environmental Science
Tamaki Campus
Private Bag 92019 Auckland
New Zealand

r.hankin at auckland.ac.nz
tel 0064-9-373-7599 x6820; FAX 0064-9-373-7042

as of: Tue Aug 13 08:29:00 NZST 2002
This (linux) system up continuously for:  348 days, 15 hours, 11 minutes
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list