How to divide this array problem ?
조회 수: 3 (최근 30일)
이전 댓글 표시
for example :
data = [6
7
5
3
4
1
2]
dataA = [6 7 3 1]
dataB = [6 5 4 2]
please I little bit confuse about this ,,,
댓글 수: 0
채택된 답변
monika shivhare
2018년 6월 7일
data = [6 7 5 3 4 1 2];
dataA =[data(1) data(2:2:end)];
dataB =[data(1:2:end)];
댓글 수: 2
monika shivhare
2018년 6월 7일
편집: monika shivhare
2018년 6월 7일
dataA=dataA(2:end);
dataB=dataB(2:end);
alternatively, use
dataA(1)=[];
dataB(1)=[];
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Earth, Ocean, and Atmospheric Sciences에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!