Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
waves 2
#R version 3.3.2 http://web.math.ucsb.edu/~grigoryan/124B/lecs/lec18.pdf print("Hello, world!") x=numeric(101) y=numeric(101) slope=numeric(101) d2y = numeric(101) dy = numeric(101) y2 = matrix(c(0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0,0,0,0,0,0,0,0,0,0),4,9,1) #slope[1]=0 #d2y[1]=0 #dy[1]=0 y2 y2[1,2] x= seq(-5,5,.1) y= exp(-x^2) s=2 for (n in 2:3){ # for (i in 2:99) { slope[i] = ( y[i+1]-y[i-1] )/ 0.2 } # for (i in 2:99) { d2y[i] = ( y[i+1]-2*y[i] + y[i-1] )/ (.2)^2 } # for (i in 2:99) { y[i] = y[i] + slope[i] * 0.1 } # plot(x,y) # plot(x,slope) for (i in 2:8) { i y2[n+1,i] = s*( y2[n,i+1] + y2[n,i-1] ) + 2*(1-s)*y2[n,i] - y2[n-1,i] } } y2 #plot(x,y2)
run
|
edit
|
history
|
help
0
Magic Constant
2
Correlação
Snowflake curve
03-08-2020-Integral-Numerica
Polynomial Regression with Interaction
Ex-02-02-21
Paired t-test [Shear Strength of Girder]
26-08-2020Teste
10-08-2020Exe