필터 지우기
필터 지우기

How to find a vector in a matrix?

조회 수: 1 (최근 30일)
M G
M G 2013년 9월 4일
댓글: nalja mot 2018년 12월 25일
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 :)

채택된 답변

Matt J
Matt J 2013년 9월 4일
[~,y]=ismember(v,x)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by