필터 지우기
필터 지우기

Extracting data from a matrix

조회 수: 1 (최근 30일)
Royvg94
Royvg94 2015년 9월 24일
답변: Thorsten 2015년 9월 24일
I have a 275 x 1 matrix, which i want to extract data from. I need matlab to make me a new matrix with the values from a cell every 4 cells. For example;
(1;88;37;6;75;3;7;43;30;45;954;24;87;63;24;12;0)
I want matriçes with those data:
(1;75;30;87;0)
(88;3;45;63)

채택된 답변

Thorsten
Thorsten 2015년 9월 24일
a = [1;88;37;6;75;3;7;43;30;45;954;24;87;63;24;12;0]
a1 = a(1:4:end)
a2 = a(2:4:end)

추가 답변 (0개)

카테고리

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