How to create new cell array from old cell array?

조회 수: 4 (최근 30일)
Alana Weir
Alana Weir 2016년 8월 17일
답변: Image Analyst 2016년 8월 17일
If I have a single column cell array of formatted date/times and i am trying to create a new array composed of the cell from every 3rd row of the original array what code should I use?
Example:
Input -
01/01/16
02/01/16
03/01/16
04/01/16
05/01/16
06/01/16
Output -
03/01/16
06/01/16

채택된 답변

Image Analyst
Image Analyst 2016년 8월 17일
Try this:
outputCellArray = inputCellArray(3:3:end);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by