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일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2023년 8월 22일

편집:

2023년 8월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by