How to gte a whole column from a cell

조회 수: 1 (최근 30일)
Ga Ma
Ga Ma 2020년 4월 3일
댓글: Ga Ma 2020년 4월 4일
Now, i have a table looks like this, how can i get the 4th column? Like [Asia; Europe;Europe;Africa;Australia;and so on]
In addition, i still want to write some codes to identify them. For example, i want to know if it is 'Asia' or 'Europe' or not, i want to get a 245x1 matrix and the elements
should be logical number 1 or 0, but i don't know how to do that, please help me! Thanks.
  댓글 수: 2
madhan ravi
madhan ravi 2020년 4월 3일
Your lease rephrase your first question.
Ga Ma
Ga Ma 2020년 4월 3일
Hello, what I mean is that i want to get the fourth column as a 245x1 cell, like 【Asia;Europe;Europe;Africa;Australia;...】, is it clear?

댓글을 달려면 로그인하십시오.

채택된 답변

madhan ravi
madhan ravi 2020년 4월 3일
Wanted1 = fieldarray(:,4);
Wanted2 = ismember(fieldarray,{'Asia','Europe');
  댓글 수: 1
Ga Ma
Ga Ma 2020년 4월 4일
It works, thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by