summaryrefslogtreecommitdiff
path: root/demos/Abhinav_Demos/is_matrix.sci
blob: 540189e0fcfa835cebc4f6f46ee8a02eeba608d2 (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
32
33
34
35
36
37
38
39
40
41

// Test file for "ismatrix" function for the data types double, float, double complex, uint16, string

function is_matrix()
	disp('Double')
	a= [1 ,25, 52]
	disp(ismatrix(a))
	disp('')
	b=1.2131
	disp(ismatrix(b))
	disp('')
	
	disp('Float')
	c=float(a)
	disp(ismatrix(c))
	disp('')
	d=float(b)
	disp(ismatrix(d))
	disp('')

	disp('String')
	e= ['af' 'as' '12'; '121' 'king' 'queen' ]
	disp(ismatrix(e))
	disp('')
	f='Light'
	disp(ismatrix(f))
	disp('')

	disp('doubleComplex')
	g=[%i*2; %i*91+100]
	disp(ismatrix(g))
	disp('')
	h= %i*98.12 + 121
	disp(ismatrix(h))
	disp('')

	disp('Uint16')
 	i= [12, 231 ,213, 123]
	disp(ismatrix(i))
	disp('')
endfunction