This question is closed. Reopen it to edit or answer.
WHY THIS ERROR OCCUR ''??? Subscript indices must either be real positive integers or logicals."
1 view (last 30 days)
t=-5 :0.1 :10;
Wayne King on 6 Nov 2012
Edited: Wayne King on 6 Nov 2012
The problem is that you have a vector, tn, that goes in increments of 0.1, but you cannot access elements of another vector y() using that.
The elements of y() have to be accessed using a positive integer between 1 and the length of y.
y = randn(100,1);
You are trying to do this: