Mercurial > hg > octave-nkf
comparison scripts/optimization/glpk.m @ 10541:e9d1a974a517
Eliminate repmat (Inf, x , y) and simply use Inf (x,y)
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Thu, 22 Apr 2010 14:38:58 -0700 |
parents | 09da0bd91412 |
children | 95c3e38098bf |
comparison
equal
deleted
inserted
replaced
10540:952d4df5b686 | 10541:e9d1a974a517 |
---|---|
473 | 473 |
474 ## 5) Vector with the upper bound of each variable | 474 ## 5) Vector with the upper bound of each variable |
475 | 475 |
476 if (nargin > 4) | 476 if (nargin > 4) |
477 if (isempty (ub)) | 477 if (isempty (ub)) |
478 ub = repmat (Inf, nx, 1); | 478 ub = Inf (nx, 1); |
479 elseif (! isreal (ub) || all (size (ub) > 1) || length (ub) != nx) | 479 elseif (! isreal (ub) || all (size (ub) > 1) || length (ub) != nx) |
480 error ("UB must be a real valued %d by 1 column vector", nx); | 480 error ("UB must be a real valued %d by 1 column vector", nx); |
481 return; | 481 return; |
482 endif | 482 endif |
483 else | 483 else |
484 ub = repmat (Inf, nx, 1); | 484 ub = Inf (nx, 1); |
485 endif | 485 endif |
486 | 486 |
487 ## 6) Sense of each constraint | 487 ## 6) Sense of each constraint |
488 | 488 |
489 if (nargin > 5) | 489 if (nargin > 5) |