help-octave
[Top][All Lists]

## Re: frozen_at_z_len problems

 From: Ben Sapp Subject: Re: frozen_at_z_len problems Date: Tue, 29 Feb 2000 10:40:22 -0700

```On Tue, 29 Feb 2000, John W. Eaton wrote:
> Can you explain what it is you are trying to do, or provide a complete
> working example that demonstrates the problem (I can't duplicate your
> problem with the incomplete information you provided).

You bet.  The file in question is on the web at
http://www.neutrino.lanl.gov/~bsapp/octave/lp.cc

Make lp.oct with mkoctfile.(It will only work on the unstable versions of
Octave.)  Then put lp.oct in your path.  Then run octave and issue the
following commands:

page_screen_output = 0;
A1 = [-1 1 2 1 2 ; -1 2 3 1 1 ; -1 1 1 2 1 ];
B1 = [7;6;4]
F1 = [-2 4 7 1 5]
LB1 = [-Inf;0;0;0;0]
UB1 = [1;1;1;1;1]*Inf
N1 = 3
x = [-1;0;1;0;2]
sol = lp(F1,A1,B1,LB1,UB1,N1)

As a side note if it works correctly sol should be equal to x.   Simply
figuring out what makes it crash is most important.

I put a comment in the code to help you find the orignal posted code.
Look for:
// Here is the original excerpt

> It appears that whichBound is supposed to be a row vector, and you
> want to select some elements from it.  If so, what is wrong with
>
>   RowVector result (whichBound.index (tmp_cols));
>

You are correct.  The above seems to yield the same results.
So, I thought that I was doing it incorrectly and switched to Matrices
which I have done succesfully more times.

If more examples would be helpful I can provide them.

Thanks for the help debugging my code. :)

-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------

```