我一直试图从数组中找到最大值.但我不断收到以下错误.请指教.
scores = [19212 56722 73336 44805 47268]
max(scores)
??? Index exceeds matrix dimensions.
Run Code Online (Sandbox Code Playgroud)
Adr*_*ian 10
你定义了一个名为max的数组吗?
scores = [19212 56722 73336 44805 47268 ]
max(scores)
ans = 73336
Run Code Online (Sandbox Code Playgroud)
如果我定义一个名为max的数组
max=[1:10]
max(scores)
??? Index exceeds matrix dimensions.
Run Code Online (Sandbox Code Playgroud)
使用哪个功能检查
which max
max is a variable.
Run Code Online (Sandbox Code Playgroud)
它应该是
which max
built-in (C:\Program Files\MATLAB\R2009a\toolbox\matlab\datafun\@logical\max) % logical method
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7822 次 |
| 最近记录: |