フィルターのクリア

how to do intersection between 3 vectors?

58 ビュー (過去 30 日間)
Sahar abdalah
Sahar abdalah 2015 年 8 月 6 日
コメント済み: KAE 2021 年 7 月 1 日
hello, I want to obtain the intersection between 3 vector as fellow :
A = [1,3,8,5];
B = [4,1,6,8];
C= [5,8,7,1];
ABC_inter=intersect(A,B,C,'stable')
the result should be :
ABC_inter=[1,8]
But I obtain this error, please help me to solve this problem and thanks in advance.
Error using intersect (line 101)
Invalid input. Valid flags are 'rows', 'stable', 'sorted', 'legacy', 'R2012a'.
Error in testerr (line 4)
ABC_inter=intersect(A,B,C)
  1 件のコメント
KAE
KAE 2021 年 7 月 1 日
See this FEX file. including Alexander Stepanov's edit.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 8 月 6 日
A = [1,3,8,5];
B = [4,1,6,8];
C= [5,8,7,1];
ABC_inter=intersect(intersect(A,B,'stable'),C,'stable')
  1 件のコメント
Sahar abdalah
Sahar abdalah 2015 年 8 月 6 日
thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by