octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46639] Bad interpretation of integer matrix


From: Lorenzo Pattarini
Subject: [Octave-bug-tracker] [bug #46639] Bad interpretation of integer matrix
Date: Wed, 09 Dec 2015 15:56:43 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #2, bug #46639 (project octave):

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 = [2*h, 3*h/2, 4*h/3, 5*h/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)
    _______________________________________________________

Additional Item Attachment:

File name: diary                          Size:0 KB
File name: octaveOutputPaste              Size:54 KB
File name: justMatrixDefinition           Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46639>

_______________________________________________
  Messaggio inviato con/da Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]