How do I split a (2 x n x m) list of doubles into two separate lists of doubles 2 individual (n x m) lists of doubles?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a list of doubles, 2 x n x m. I tried a 'for' loop with something like this:
new_list_1 = []
for i = 1:n
for ii = 1:m
new_list_1(i,ii) = original(1,i,ii)
end
end
new_list_2 = []
for j = 1:n
for jj = 1:m
new_list_2(j,jj) = original(2,j,jj)
end
end
I can't think of a way to do this, many thanks.
댓글 수: 1
채택된 답변
Torsten
2015년 11월 4일
new_list_1(:,:)=original(1,:,:);
new_list_2(:,:)=original(2,:,:);
Best wishes
Torsten.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!