Hi,
In the code snippet provided, you have initialised t as a vector of size 1 x 2 and Nexi and Nent as vectors of size 1 x 1.
During each iteration of the for loop, the sizes of t, Nexi, Nent and Nout are incremented by 1. However, the size of t is always 1 more than the others as its initial size was more. This is causing an error as the plot function expects vectors of the same size as input.
Based on my understanding of the provided code snippet, I suspect line 11 is supposed to be as follows :-
t(i) = t(i - 1) + dt;