Borrar filtros
Borrar filtros

how to common string data in two string celland their indexes

2 visualizaciones (últimos 30 días)
Muhammad
Muhammad el 1 de Jun. de 2021
Editada: Jan el 1 de Jun. de 2021
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

Respuesta aceptada

Jan
Jan el 1 de Jun. de 2021
Editada: Jan el 1 de Jun. de 2021
[Both, indexPop, indexNames] = intersect(population, names)
Here indexNames is not a cell, but a vector, which is more useful for indexing.

Más respuestas (0)

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by