MATLAB: The end operator must be used within an array index expression

operator

How to fix this error:
The end operator must be used within an array index expression.
Error in …. (line 17)
shot = shot(101:end,1);

Best Answer

The identifiers shot (all lower-case) and Shot (first letter capitalized) are two different things in MATLAB. Did you mean to index into Shot instead of shot?
Related Question