필터 지우기
필터 지우기

create and fill new matrices every nth row of an initial matrix

조회 수: 1 (최근 30일)
rania
rania 2017년 7월 26일
답변: Andrei Bobrov 2017년 7월 26일
Hello everyone! Here is my problem I have a 3060 X 2 matrix and what I want is to store the data every 170 rows (both columns) in a new matrix. So I want finaly to have 18 matrices of 170X2 each.
Thank you a lot!

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2017년 7월 26일
Let A - your matrix [3060 x 2]
out = permute(reshape(A',size(A,2),170,[]),[2 1 3]);

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by