"Emrah " <email@example.com> wrote in message <firstname.lastname@example.org>... > > > Set x2 and x3 to NaN where the constraints are not satisfied, e.g., > > > > G=[g1,g2,g3,g4,g5,g6,g7]; > > infeasible=~all(G(:)); > > x2(infeasible)=nan; > > x3(infeasible)=nan; ================
> > Error using horzcat > CAT arguments dimensions are not consistent. > > Error in fplot2 (line 8) > G=[g1,g2,g3,g4,g5,g6,g7]; > > any idea? ==============
Nope. Don't you expect all g1....g7 to be the same size? If not, it should be obvious to you why it might not be possible to concatenate them. If so, did you check what sizes they are? What happens when use DBSTOP to pause execution at line 8 and do "whos g*"