MethodError in For loop

I’m guessing that your problem is that you are using y for two different things: as a symbolic variable and as a vector of values to be plotted.

3 Likes