how can i solve a warnning saying the length of lower bound is > length of( x)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
metasebia dabi
el 4 de Jul. de 2021
Comentada: Cris LaPierre
el 6 de Jul. de 2021
i am new to matlab i have attached my code can you help me please
3 comentarios
Respuesta aceptada
Cris LaPierre
el 4 de Jul. de 2021
I had to fix another error first.
Error in main (line 14)
Aineq=[0,6,-1,0,0,0,o,o];
It looks like you added the letter "o" instead of the number 0 for the last 2 values.
The red text that follows the warning is there to help you find and fix the error.
The number of columns in A must be the same as the number of variables.
The error pointing back to main is the one you should look at:
Error in main (line 23)
[x_gal,fval_gal,~,gaoutput1]=gamultiobj(fun,7,Aineq,bineq,Aeq,Beq,lb,ub,@nonlcon,opts_ga);
You say you have 7 variables, but Aineq contains 8 values. Change your nvars input to 8 (or Aineq and Aeq to 7 values) and this warning and error will go away..
0 comentarios
Más respuestas (1)
metasebia dabi
el 4 de Jul. de 2021
1 comentario
Cris LaPierre
el 6 de Jul. de 2021
I'm not familiar with your equation or your application, so can't comment extensively. Perhaps all other solutions are considered inferior to this single solution. This may be because of the high dimension of your equation (8), or the constraints you have placed on them, or of the problem space itself.
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!