bugGNU Octave - Bugs: bug #46639, Bad interpretation of integer...

 
 

bug #46639: Bad interpretation of integer matrix

Submitted by:  None
Submitted on:  Wed 09 Dec 2015 12:34:33 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: InvalidAssigned to: None
Originator Name: Lorenzo PattariniOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.1
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 09 Dec 2015 05:03:38 PM UTC, comment #8:

Nothing for you to do, closing this report as invalid now.

Mike Miller <mtmiller>
Project Administrator
Wed 09 Dec 2015 04:59:51 PM UTC, comment #7:

Yes! you're right!
thanks a lot! I'm very sorry I didn't notice that, but in truth I didn't know that.
thanks again! do I have to remove this discussion from bug's list?

Lorenzo Pattarini <belegdraug>
Wed 09 Dec 2015 04:35:07 PM UTC, comment #6:

The problem is with the tabs in

If you delete the tabs (I wrote there <tab>) and replace them by spaces, it will work.

Avinoam Kalma <avinoam>
Project Member
Wed 09 Dec 2015 04:34:16 PM UTC, comment #5:

I think you are pasting text which contains two <Tab> characters at the beginning of the continuation lines, is that correct?

Octave uses the <Tab> character in the interactive command line to complete on variable and function names. So in the middle of your matrix definition, the <Tab> characters are triggering Tab-completion when you are pasting the entire block of text. Try removing the tabs or using spaces instead.

If that works, I don't think this is a bug but rather a feature of how readline works (and will be the same in bash or other readline-linked interactive programs).

Mike Miller <mtmiller>
Project Administrator
Wed 09 Dec 2015 04:33:32 PM UTC, comment #4:

Nothing changes!
it gives me the same strange result!
I attach the results

(file #35677, file #35678)

Lorenzo Pattarini <belegdraug>
Wed 09 Dec 2015 04:25:07 PM UTC, comment #3:

You have a ; at the end of your line.
11, 1, 1, 11 ];
change that to
11, 1, 1, 11 ]
and try again

Doug Stewart <dastew>
Wed 09 Dec 2015 03:56:43 PM UTC, comment #2:

Good afternoon!
Well, I can reproduce it in each octave session I try to execute, but I don't succed in redirecting the output on file!
I tried to use diary but octave doesn't save in diary all the output I see, I also tried to make a little script and running it from command line but I don't obtain any bad result.

For better understanding I attach the following files:

  • item 1 file "diary":

I opened octave, digited " diary on " and then copied and pasted the following
function:

+ verbatim +
function [ I ] = openNC(f,a,b,n,dec)
if(n<0 || n>4)
disp("Error!");
endif

Nc_coeff = [ 1, 0, 0, 0;
1, 1, 0, 0;
2, -1, 2, 0;
11, 1, 1, 11 ];

h = (b-a)/(n+2);
coeff = [2h, 3h/2, 4h/3, 5h/24];

x = a+h:h:a+(n+1)*h;
I = 0;

for i=1:n+1
I = I + coeff(n+1)Nc_coeff(n+1,i)f(x(i));
endfor

endfunction
- verbatim -

  • item 2 file "octaveOutputPaste":

a copy of octave's terminal output after trying to define the function openNC.
It doesn't allow me to scoll up all the terminal output 'cause it's too long.

I have same behave either if I try to define function or if I just define the matrix itself, so I attach also the

  • item 3 file "justMatrixDefinition": I opened octave, digited diary on and then paste the following code:

+ verbatim +
Nc_coeff = [ 1, 0, 0, 0;
1, 1, 0, 0;
2, -1, 2, 0;
11, 1, 1, 11 ];
- verbatim -

thanks again for helping!

(file #35674, file #35675, file #35676)

Lorenzo Pattarini <belegdraug>
Wed 09 Dec 2015 04:51:10 AM UTC, comment #1:

Thanks for your bug report. If this is a reproducible bug, this report needs some more details to be actionable. The provided text works fine for me in Octave 3.8.1, 3.8.2, and 4.0.0. What is the exact error message that was printed? Are you able to reproduce it in a new Octave session?

Mike Miller <mtmiller>
Project Administrator
Wed 09 Dec 2015 12:34:33 AM UTC, original submission:

Greetings!!
trying to define this matrix

the intepreter answered me with a long list of what seems to be a long list of internal function.
I'm pretty sure that just first two matrix row are the cause of this strange behave.
I tried to run it as a script in order to redirect the output in a attachable file it does not give me the same strange bug.
Thanks for helping!
Salute e Pace!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #35677:  withoutSemicolon added by belegdraug (191B - application/octet-stream)
file #35678:  withoutSemicolonTerminalPaste added by belegdraug (52KiB - application/octet-stream)
file #35674:  diary added by belegdraug (711B - application/octet-stream)
file #35675:  octaveOutputPaste added by belegdraug (55KiB - application/octet-stream)
file #35676:  justMatrixDefinition added by belegdraug (120B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by belegdraug (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 Dec 2015 05:03:38 PM UTCmtmillerStatusWorks For Me=>Invalid
      Open/ClosedOpen=>Closed
    Wed 09 Dec 2015 04:33:32 PM UTCbelegdraugAttached File-=>Added withoutSemicolon, #35677
      Attached File-=>Added withoutSemicolonTerminalPaste, #35678
    Wed 09 Dec 2015 03:56:43 PM UTCbelegdraugAttached File-=>Added diary, #35674
      Attached File-=>Added octaveOutputPaste, #35675
      Attached File-=>Added justMatrixDefinition, #35676
    Wed 09 Dec 2015 04:51:10 AM UTCmtmillerStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1