I want to generate an Output matrix from the Input Matrix such that
Input matrix = [a1,a2,a3,....; b1,b2,b3,....; .............; .............; z1,z2,z3,....; .............]gives the Output Matrix = [a1,b1,c1,...,x1,y1,z1; a1,b1,c1,....,x1,y1,z2; a1,b1,c1,....,x1,y1,z3; ......................; a1,b1,c1,....,x1,y2,z1; a1,b1,c1,....,x1,y2,z2; a1,b1,c1,....,x1,y2,z3; ......................; a1,b1,c1,....,x2,y1,z1; a1,b1,c1,....,x2,y1,z2; a1,b1,c1,....,x2,y1,z3; ......................; ......................; a2,b1,c1,.....,x2,y,z1; ......................; ......................; ......................]Means the elements of same row in INPUT matrix must not be in same row in Output matrix.and must group with the all the elements of the others rows of input matrix as per the output pattern.ExampleInput Matrix =[100,60,20;50,30,10;700,500,200]Output Matrix=[100,50,700;100,50,500;100,50,200;100,30,700;100,30,500;100,30,200;100,10,700;..20,10,700;20,10,500;20,10,200]
Best Answer