Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
回归本源。如何从工作区中的“变量”表中提取最大值和最小值?min(nameofvariable) 不起作用,返回错误消息“下标索引必须是真正的正整数或逻辑”。谢谢你的帮助!
假设您有一个名为 的矩阵nameofvariable,则正确的语法确实是:
nameofvariable
min(nameofvariable)
这会给你列明智的分钟
对于完整的最小值:
min(nameofvariable(:))
您的错误表明您有一个名为 min 的变量(尽量避免这种情况),请尝试:
clear min min(nameofvariable)