From 725d9ee2ddb254f57a896bb47e0e727759eb5901 Mon Sep 17 00:00:00 2001 From: avinashlalotra Date: Fri, 4 Apr 2025 01:38:55 +0530 Subject: fixed : failing testcase and oytput dim --- macros/digitrevorder.sci | 2 -- 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 diff --git a/test1.sce b/test1.sce index 19176c8..2fea72e 100644 --- a/test1.sce +++ b/test1.sce @@ -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] -- cgit