how to common string data in two string celland their indexes

조회 수: 1 (최근 30일)
Muhammad
Muhammad 2021년 6월 1일
편집: Jan 2021년 6월 1일
i have two cells
population 235*1 cell
names 332*1 cell
both have string data
i want an other cell which have the common data of both population and names
and an other cell which contain their previous location in names

채택된 답변

Jan
Jan 2021년 6월 1일
편집: Jan 2021년 6월 1일
[Both, indexPop, indexNames] = intersect(population, names)
Here indexNames is not a cell, but a vector, which is more useful for indexing.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by