フィルターのクリア

how to get index position of rows

1 回表示 (過去 30 日間)
Elysi Cochin
Elysi Cochin 2014 年 3 月 5 日
編集済み: Andrei Bobrov 2014 年 3 月 5 日
i have a 2 matrix, matrix1 with dimension 2100*128 and matrix2 with dimension 16*128... i wanted to get the index positions of those rows which matches with matrix1, i did as below
for v = 1:k
inds = find(dbfea(1:2100,1:128)==tempfea(v,1:128));
neighindex(v,1) = inds(1);
end
but i'm getting error as
??? Error using ==> eq
Matrix dimensions must agree.
Error in ==> MainGUI>Retrieval_pushbutton_Callback at 304
inds = find(dbfea(1:2100,1:128)==tempfea(v,1:128));
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> MainGUI at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)MainGUI('Retrieval_pushbutton_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
what should i do to rectify it....
  2 件のコメント
Walter Roberson
Walter Roberson 2014 年 3 月 5 日
You want to match rows against corresponding rows? Or you want to check if a row is found in any of the rows in the other matrix?
Elysi Cochin
Elysi Cochin 2014 年 3 月 5 日
編集済み: Elysi Cochin 2014 年 3 月 5 日
i want to check if a row is found in any of the rows in the other matrix
sir but what is the difference between the 2 questions you asked....

サインインしてコメントする。

採用された回答

Andrei Bobrov
Andrei Bobrov 2014 年 3 月 5 日
編集済み: Andrei Bobrov 2014 年 3 月 5 日
[l0,idx] = ismember(tempfea,dbfea,'rows');
out = idx(l0);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by