- #1
williamrand1
- 21
- 0
Hi all,
Im having a problem with the for loop. Any help would be great!
The code is simple,
x = -3:0.5:3;
For i = x
q(i) = i^2;
end
q
The error seems to be the negative index in the statement of the for loop.
Hope this is clear. Thanks!
Im having a problem with the for loop. Any help would be great!
The code is simple,
x = -3:0.5:3;
For i = x
q(i) = i^2;
end
q
The error seems to be the negative index in the statement of the for loop.
Hope this is clear. Thanks!