Borrar filtros
Borrar filtros

How to find a vector in a matrix?

1 visualización (últimos 30 días)
M G
M G el 4 de Sept. de 2013
Comentada: nalja mot el 25 de Dic. de 2018
Hi all,
Assume a vector:
v = [1:3:1000];
How can I find the number of columns of each value in the vector:
x = [100, 280, 781, 925, 997];
in the bigger vector, v.
I tried:
y = find(x == v)
But no success! Any hint is greatly appreciated :)

Respuesta aceptada

Matt J
Matt J el 4 de Sept. de 2013
[~,y]=ismember(v,x)

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by