Split vector into smaller vectors, then separate
이전 댓글 표시
I have a 240x1 cell, in each row there is a 1x1 struct. In each struct there are 5 fields, one of these is 'name' that can be target, notTarget, gap (these are the 3 possible names). The order is always the same (as concerning the name field): target or not target gap target or not target gap ....
I should split this vector in smaller vectors (2x1) made with a target (or not target) and a gap. Then I should separate the two different group of vectors: one with target, one with notTarget. Can anyone help me please?
댓글 수: 2
I would suggest that you convert your data in a non-scalar structure, then your task become easier using basic indexing and commands. The best solution would be to get rid of the cell array entirely, and have just one non-scalar structure. This will simplify your code and make is more efficient.
Bartolomeo Ruotolo
2016년 2월 9일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Variable Initialization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!