MATLAB : I get the error ‘Subscript indices must either be real positive integers or logicals.

Error in Matlab

Subscript indices must either be real positive integers or logicals.

SOLUTION
Issue was in me case, me variable had same name like function max.
Example:

max = 100
A = [ 1 3 2 4; 1 2 3 6]
max (A) % max is function in matlab

CAN HELP : www.mathworks.com

Facebook Comments