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."?
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 8 de Mzo. de 2021
Respondida: MathWorks Support Team
el 8 de Mzo. de 2021
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?
Respuesta aceptada
MathWorks Support Team
el 8 de Mzo. de 2021
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 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!