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.
|
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:
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)
|
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!
|