Matlab has limitations in terms of how things can be numbered/indexed:
- Arrays and cell arrays require indices that are natural numbers (with exceptions that are discouraged and not more general).
- Field names of structure arrays can only be strings that start with a letter and are followed by letters/digits/underscores.
However, it might be common/appropriate/intuitive to number certain things using zero or negative numbers or non-integer numbers.
For example, storing more and more so-called spherical harmonics requires increasingly negative "indices".
Scaling and shifting those "indices" such that they are natural numbers, i.e. valid (cell-)array indices, has disadvantages (smaller negative indices or finer non-integer indices might appear later, requiring a recomputation of the scale or shift parameters and adjustment of the entire data structure; understanding the resulting data structure requires knowing the scale and shift parameters and requires "mental math" while looking at the data).
Is there a way without these disadvantages?