summaryrefslogtreecommitdiff
path: root/2.3-1/demos/Brijesh_Demos/test_ndgrid.sci
blob: 79f9a5d3388660f6e1957676cb488f0acfc62e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function test_ndgrid
	disp('Datatype: Double');
	i1 = linspace(-1,1,10);
	i2 = linspace(-1,1,3);
	[o1, o2] = ndgrid(i1,i2);
	disp(o1);
	disp(o2);
	disp('Datatype: float');
	i3 = linspace(-1,1,10);
	i4 = linspace(-1,1,3);
	[o3, o4] = ndgrid(float(i3),float(i4));
	disp(o3);
	disp(o4);
	disp('Datatype: Double Complex');
	i5 = [1 %i 3];
	i6 = [%i 3+%i 5*%i 9 7 0];
	[o5, o6] = ndgrid(i5,i6);
	disp(o5);
	disp(o6);
endfunction