tmax<-10
t<-1:tmax
n<-matrix(0, nr=5, ncol=tmax+1)
n
n[,1]<-c(10, 10, 10, 10, 10)
for(i in (1:tmax)) {n[,i+1]<-A%*%n[,i]}
N<-numeric(tmax)
N
for(i in (1:tmax)) {N[i]<-sum(n[,i])}
plot(t-1, N, type='l', xlab="t", ylab="N")
plot(t-1, n[1,], type='l', xlab="t", ylab="N")
Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ
How do i fix this error?