필터 지우기
필터 지우기

How to divide this array problem ?

조회 수: 3 (최근 30일)
Muhammad Hafiz
Muhammad Hafiz 2018년 6월 7일
편집: monika shivhare 2018년 6월 7일
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 ,,,

채택된 답변

monika shivhare
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
Muhammad Hafiz
Muhammad Hafiz 2018년 6월 7일
편집: Muhammad Hafiz 2018년 6월 7일
thanks monica you help me ,,,
after dataA and dataB get the array ,,
how to remove, for example: dataA = [6 7 3 1] dataB = [6 5 4 2]
to
dataA = [7 3 1] dataB = [5 4 2]
monika shivhare
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 CenterFile 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!

Translated by