MATLAB: Expanding matrix matrix manipulation Hi all I want to expand matrix.for example if x=[x1;x2] then the new matrix will be: xx = [x1 x1 x1;x1 x1 x2;x1 x2 x1;x1 x2 x2;x2 x1 x1;x2 x1 x2;x2 x2 x1;x2 x2 x2] How can I do that Best Answer [j k i]=meshgrid([x1,x2]);xx = [i(:) j(:) k(:)]; Related SolutionsMATLAB: How to define a symbolic vector Yes!syms x1 x2x = [x1; x2]y = [0 1]*xproduces:y =x2 MATLAB: Infinite result when solving a linear equation rank(A) is only 11 Related QuestionSimplify expression after collect functionPlace array in a matrix
Best Answer