what will be a and b in the function call [a b] = max ([1 -5 6 -3])?
3 views (last 30 days)
Show older comments
what will be a and b in the function call [a b] = max ([1 -5 6 -3])?
0 Comments
Answers (1)
Star Strider
on 17 May 2014
The result:
a = 6
b = 3
The reason is that 6 is the maximum of the vector, and 3 is the index of 6 in the vector. See the documentation for max for details.
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!