Why am I getting the error "If the working dimension of MAX or MIN is variable in length, it must not have zero length at runtime."?
22 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2021 年 3 月 8 日
回答済み: MathWorks Support Team
2021 年 3 月 8 日
What is the cause for error:
If the working dimension of MAX or MIN is variable in length, it must not have zero length at runtime.
What is the working dimension of MAX or MIN? How can I resolve this error?
採用された回答
MathWorks Support Team
2021 年 3 月 8 日
The reason for this error is that ‘max’ and ‘min’ functions do not support variable-size empty inputs where the dimension to operate along is variable and takes on zero length at run-time.
Generally, the supported empty inputs for ‘max’ and ‘min’ functions include:
1) Fixed-size empty inputs
2) Variable-size empty inputs when the dimension to operate along has positive length
3) Variable-size empty inputs when the dimension to operate along has constant zero length
It may be helpful to make a logical decision (e.g. if else statement) before calling ‘max’ or ‘min’ function to ensure that the variable dimension is not of zero length at run-time.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!