I would like to do the following
X = matrix(0, nrow = p, ncol = N)
p=5
N=100
for (i in 1:N)
{
X[1,i] = e1(t[i])
X[2,i] = e2(t[i])
X[3,i] = e3(t[i])
X[4,i] = e4(t[i])
X[5,i] = e5(t[i])
}
where e1(). e2(), e3(), e4() and e5() are specific functions.
I have tried the following code:
for(j in 1:p)
{
for (i in 1:N)
{
X[j,i] = as.symbol(paste("e", j, sep = ""))(t[i])
}
}
But it does not work.
Thanks for your help
Carole