f <- function(x)
return(x[2]^2 + x[3]^3 +x[4]^4)
SCOptim(rep(1,10), f)
SCOptim(c(2,4,6,2,1), f, minimize = FALSE, print = TRUE)
#Will Print the List and Find the Maximum
SCOptim(c(1,2,3,4), f, time = 10, lambda = 1e-2)
#Will perform no iterations after 10 secs, Sparsity Threshold is 0.01
Run the code above in your browser using DataLab