Is there any way that indexing(subscript) 0 can be permitted. As these should be positive integer or logicals.
2 views (last 30 days)
Show older comments
-
1 Comment
DGM
on 25 Nov 2021
There is no zeroth element in a MATLAB array. Since you didn't describe your problem, it's hard to suggest any solution.
If you are trying to extract values "between" or "beyond" the discrete elements of an array, use interpolation tools like interp1() or interp2().
If you're trying to write a loop and you're trying to use a single variable (the loop iterator) for both indexing and numerical operations, don't. Separate that into a vector for numerical operations and then use the loop iterator for indexing.
Accepted Answer
More Answers (0)
See Also
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!