Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Finding the maximum number in the matrix

$
0
0
"Oliver" wrote in message <k5up0r$37h$1@newscl01ah.mathworks.com>...
> Hello!
>
> I am new matlab user. Now I wanna to find out the maximum number in the matrix A=[12 6 -6;6 16 2;-6 2 16], so I type in max(max(A)). But it says there's an error "Subscript indices must either be real positive integers or logicals."
>
> Anyone knows why and how I can fix it? Thanks so much!!


Ops!! I just find out there's a conflict between the built in function max and my defined variable. So I just cleared all the data and now it works!

Viewing all articles
Browse latest Browse all 19628

Latest Images

Trending Articles



Latest Images