Displaying 1 result from an estimated 1 matches for "tp4651436p4651455".
2012 Nov 30
3
loop function and integrate?
Hi guys!
I have to compute something and i don't know what i'm doing wrong. my code
is a bit complex, but imagine that is something like this:
a = c(1,2,3,4)
ia = length(a)
x = seq(1,100,length=0.1)
ib = length(x)
int1 = numeric(ib)
b = numeric(ib)
for(j in 1:ia) {
H = function(x) {sin(x + a[j])}
for(i in 1:ib) {
int = integrate(H, lower = 0, upper