Attempted to access A(-1); index must be a positive integer or logical.

Basic question about MATLAB programming
Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Re: Attempted to access A(-1); index must be a positive integer or logical.

Post by matlab1 »

This error appears, when the index of an array is negative and as you know, the index of a matrix can not be negative or zero in MATLAB.

The index of matrix must be bigger than zero and muse be an integer

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests