Cantor Set
Purpose : To understand the functions that characterize SVC sets
Cantor Ternary Set
> n <- 1e+05 > cset <- c(0, runif(n), 1) > cset <- sort(cset, decreasing = F) > cset <- cbind(cset, 1) > plot(cset, pch = 17, col = "blue") > m <- 1:10 > cuts <- 2^m > x <- 586/729 > x <- 5/16 > i <- 1 > temp <- numeric() > terms <- 60 > for (i in 1:terms) { + y <- x * 3 + temp <- c(temp, floor(y)) + if (y > 1) + y <- y - floor(y) + x <- y + } > print(temp) [1] 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 [39] 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2 1 |
I am a Dumb..k…. Cantor set is an uncountable set So, how can I program and show the cantor set. It is like taking N numbers to represnt real line.
Please think before you code… There are something which require pen and paper..