フィルターのクリア

find element a content in b..

2 ビュー (過去 30 日間)
piero
piero 2023 年 8 月 22 日
編集済み: Dyuman Joshi 2023 年 8 月 22 日
what word reserver should i use?
a: 5 20 0 3 5 1 1 10
b: 3 5 9 12 4 7 0 0
ans=3 5 4 0
i want element in b wich content element a
intersect? ismember? find? i don't know
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 8 月 22 日
編集済み: Dyuman Joshi 2023 年 8 月 22 日
"intersect? ismember? find? i don't know"
You should experiment around with different methods and functions and see what output they give. You will learn about the functionality of functions and get an idea as to where to use them.

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

採用された回答

Matt J
Matt J 2023 年 8 月 22 日
編集済み: Matt J 2023 年 8 月 22 日
I don't know why you think there should be a 4 in the result.
a = [5 20 0 3 5 1 1 10];
b = [3 5 9 12 4 7 0 0];
intersect(a,b)
ans = 1×3
0 3 5
  1 件のコメント
piero
piero 2023 年 8 月 22 日
4 is an error...:D
thanks

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by