Why do I get "Array indices must be positive integers or logical values"?
Show older comments
delta_x = 2/40;
x = [];
for i = 1:1:41
x = x (i-1) * delta_x;
end
1 Comment
Adam
on 29 Aug 2018
This is one of the most helpfully descriptive error messages you get in Matlab. It tells you exactly what the problem is!
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!