Created
March 21, 2015 12:32
-
-
Save ntuaha/75bed7540d7fe3fefa82 to your computer and use it in GitHub Desktop.
R 的問題
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#先定義函數 | |
ff = function(y,i){ | |
if (i==1){ | |
return((4*5+1)%%16) | |
}else{ | |
y[i] = (y[i-1]*5+1)%%16 | |
return(y) | |
} | |
} | |
#迴圈 | |
for ( i in 1:3){ | |
y = ff(y,i) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment