blob: a84f7257dd165042fdba6b006b62e5d25f4013e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Test file for "Column" function for the data types double, float, double complex, string , uint16.
// All the below statements are added to initialize variables in different data types
//The function written doesn't work for string or character scalar as of now.
function test_pertrans()
a= [1 2 3; 4 5 6; 7 8 9]
b= pertrans(a)
disp('Double')
disp(b)
disp('')
disp(pertrans(6))
disp('')
c= float(a)
d=pertrans(c)
e= float(2)
disp('Float')
disp(d)
disp('')
disp(pertrans(e))
disp('')
f=[%i*121+12; 4+%i*7;1]
g= pertrans(f)
disp('Double Complex')
disp(g)
disp('')
disp(pertrans(%i*8712+12))
disp('')
endfunction
|