function - how to find min and max of float number in matlab -
the min , max functions in matlab work on integer values. how can find min , max of double vector?
a = [2.1 3.4 5.6 7.6] min(a) returns me:
subscript indices must either real positive integers or logicals.
you've assigned min variable name array somewhere in code.
when call min(a), matlab trying grab indices [2.1,3.4,5.6,7.6] array min. fix problem, call variable else.
edit: , if you're running outside of function, clear min , max, @acorbe points out.
Comments
Post a Comment