I am trying to use the following Matlab function:
function [ N,n ] = rn( t )
n(1)=rand-0.5; for i=2:N;
with this script:
however, I am getting the following error:
Subscript indices must either be real positive integers or logicals.
Error in rn (line 7)
n(i) = 0.3*n(i-1)+1.5*(rand()-0.5);
Error in engg177parte (line 5)
Why is this error occuring?