diff options
-rw-r--r-- | macros/digitrevorder.sci | 2 | ||||
-rw-r--r-- | test1.sce | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/macros/digitrevorder.sci b/macros/digitrevorder.sci index 0137542..84041fc 100644 --- a/macros/digitrevorder.sci +++ b/macros/digitrevorder.sci @@ -54,8 +54,6 @@ function [y, i] = digitrevorder (x, r) y(old_ind + 1) = x(i); if (size(x,2)== 1) y = y(:); - else - i = i.'; end endfunction @@ -40,12 +40,12 @@ else end /////////Test case for **) digitrevorder ////////// - -x = [%i,1,3,6*%i] ; +i = %i ; +x = [i,1,3,6*i] ; b = 2; -[y i]=digitrevorder(x,b); +[y ii]=digitrevorder(x,b); -if(y == [%i 3 1 6*%i] & i == [1 3 2 4]) +if(y == [i 3 1 6*i] & ii == [1 3 2 4]) test_pass=[test_pass,1] else test_pass=[test_pass,0] |