Error in max function
8 views (last 30 days)
Show older comments
Why do I get this error?
>> MAX
a =
2 3 5
Index exceeds the number of array elements (1).
Error in MAX (line 2)
b = max(a)
I get the same kind of error when I dot this:
g1 = input('Give a number: ')
g2 = input('Give another number: ')
gg = max([g1,g2])
3 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!