[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bizarre Error
From: |
pand9613 |
Subject: |
Re: Bizarre Error |
Date: |
Thu, 13 Feb 2003 15:33:53 +1100 |
User-agent: |
Internet Messaging Program (IMP) 3.0 |
Jwe,
Since you used the variable "a" in your testfile.dat and then run the code, a
is reassigned to [1,2;3,4] and hence does not initiate a second running of the
while loop. (since the value of "a" is the condition). Try a different variable
name and let me know the results.
Also I just found that i did infact need to run the code from inside a while
loop to get the error however once the error had occurred once it would occur
again whether the lines of code were run inside the while loop or not. This
continued until i restarted octave.
Cheers
Peter Anderson
Quoting "John W. Eaton" <address@hidden>:
> On 13-Feb-2003, address@hidden <address@hidden> wrote:
>
> | Okay to make everyones life easier i have isolated the problem:
> |
> | i have written a new function that has the same problem:
> | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> | function test
> | a=1
> | while a==1
> | loadline=['load -force testfile.dat'];
> | eval(loadline);
> | userin=input('>>','s');
> | userin=str2num(userin)
> | if userin==0
> | return
> | end
> | end
> | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> |
> | just create the file testfile.dat containing any old stuff then run this
> | function. Test different strings...a string prefixed by a number produces
> an
> | error.
>
> This seems to work correctly for me with 2.1.44:
>
> octave:1> test
> a = 1
> >>abc123
> userin = [](0x0)
> octave:2> test
> a = 1
> >>123abc
> userin = [](0x0)
>
> You say that the contents of testfile.dat doesn't matter, but in case
> it does, I used:
>
> # Created by Octave 2.1.44, Wed Feb 12 18:16:03 2003 CST <address@hidden>
> # name: a
> # type: matrix
> # rows: 2
> # columns: 2
> 1 2
> 3 4
>
> jwe
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
>
-------------------------------------------------
This mail sent through IMP: www-mail.usyd.edu.au
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Re: Bizarre Error, pand9613, 2003/02/11
- RE: Bizarre Error, Julian DeMarchi, 2003/02/11
- RE: Bizarre Error, Julian DeMarchi, 2003/02/11
- RE: Bizarre Error, Julian DeMarchi, 2003/02/12
- RE: Bizarre Error, Julian DeMarchi, 2003/02/12