MATLAB: Simple way of matrix array resorting matrix array I have three matrix, A, B, and C. A = [a1 a2 a3 …], B = [b1 b2 b3 …], C = [c1 c2 c3 …] I want to create a matrix Q which look like a1 b1 c1 a2 b2 c2 a3 b3 c3 … What's simplist code? Thank you. Best Answer Robust:Q = [A(:),B(:),C(:)] Related SolutionsMATLAB: Resorting a list generated by subdirectories Have a look at Natural-Order Filename Sort.BTW, you don't need to change the directory. Just used = dir(fullfile(newpath, '*c*')); MATLAB: Resort struct elements by one field values Would this do it?a.foo = [3, 4, 1, 2, 5];a.bar = {'a','b','c','d','e'};% assuming b already existsb = a;% reorder b[sortfoo,idx] = sort(a.foo);b.foo = sortfoo;b.bar = b.bar(idx) Related QuestionHi every one, can i get help to make this, thank youHow to optimize the calculation of the mean between the elements of A and B efficientlyHow to make a causal interleaver in the Communications ToolboxManibulation of 3d matrix
Best Answer