frontal

by

 

15 Mar 2011 (Updated )

Do: C = frontal_mtimes(A, b); not: for k=1:size(A,3), C(:,:,k) = A(:,:,k) * b(:,:,k); end

frontal_flatten (A)
function A = frontal_flatten (A)
    [m,n,p] = size(A);
    A = transpose(reshape(frontal_transpose(A),[n,m*p,1]));
end

%!test
%! in = cat(3, [1 2 3], [4 5 6]);
%! out = cat(1, [1 2 3], [4 5 6]);
%! out2 = frontal_flatten (in);
%! %out2, out  % DEBUG
%! myassert(out2, out)

Contact us