The bug is happening under cygwin and, to keep things simple, I have just
used the standard cygwin download with all the packages (octave as one of
them). I did this very recently. If you think I should not have any
trouble downloading and installiing the new version in this environment, I
will try it.
I have attached a verison of the file to this mail message.
----------------------------------------
Brad@pc-bbell ~/trash
$ cat junk.m
n = 2;
m = 1;
x = ones(n, 2*m);
s = zeros( n, m );
for i = 1:m
s(:,i) = complex( x(:,2*i-1), x(:,2*i) );
end
------------------------------------------
Here is an octal dump of the file
------------------------------------------
Brad@pc-bbell ~/trash
$ od -c junk.m
0000000 n = 2 ; \n m = 1
0000020 ; \n x = o n e s ( n ,
0000040 2 * m ) ; \n s = z e r o
0000060 s ( n , m ) ; \n f o r i
0000100 = 1 : m \n s ( : , i )
0000120 = c o m p l e x ( x ( : ,
0000140 2 * i - 1 ) , x ( : , 2 * i )
0000160 ) ; \n e n d \n \n
0000171
--------------------------------------------
Here is the result of running the script under octave
---------------------------------------------
Brad@pc-bbell ~/trash
$ octave junk.m
GNU Octave, version 2.1.73 (i686-pc-cygwin).
Copyright (C) 2006 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Additional information about Octave is available at
http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit
http://www.octave.org/help-wanted.htmlReport bugs to <
bug@...> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
assertion "nread == 1" failed: file "lex.l", line 1998
Aborted (core dumped)
---------------------------------------------------------------------------
On Tue, 6 May 2008, John W. Eaton wrote:
> On 28-Apr-2008, Brad Bell wrote:
>
> | Bug report for Octave 2.1.73 configured for i686-pc-cygwin
> |
> | Description:
> | -----------
> |
> | * The error message above is printed and then Octave aborts the following
> | script file:
> | =======================================================================
> | nTimes = 2;
> | nChans = 1;
> | center_frequency = 1;
> | x = ones(nTimes, 2*nChans);
> | if center_frequency > 0
> | sig = zeros( nTimes, nChans );
> | for chan = 1:nChans
> | sig(:,chan) = complex( x(:,2*chan-1), x(:,2*chan) );
> | end
> | else
> | sig = x;
> | end
> | ========================================================================
> |
> | problem. Suggestions or general comments are also welcome.
> |
> | Repeat-By:
> | ---------
> |
> | * Step 1: save the file above as junk.m.
> | * Step 2: run octave in same directory.
> | * Step 3: execute the command "junk".
> |
> | * Result: assertion "nread == 1" failed: file "lex.l", line 1998
>
> I'm unable to reproduce the problem with Octave 2.1.73 or Octave 3.0.
>
> Since there is something funny going on with the lexer, it would
> probably be best to send the file as a binary attachment in case there
> are some funny characters in your copy of the file that are not making
> it through when you paste it into a mail message. But in any case,
> Octave 2.1.73 is obsolete. I strongly encourage you to upgrade to the
> latest stable release, 3.0.1. If the problem persists after
> upgrading, then please submit another report.
>
> jwe
>
n = 2;
m = 1;
x = ones(n, 2*m);
s = zeros( n, m );
for i = 1:m
s(:,i) = complex( x(:,2*i-1), x(:,2*i) );
end
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave