필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Comparing any of the matrix input

조회 수: 2 (최근 30일)
betul uslu
betul uslu 2019년 12월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
I have matrix 'classes
classes =
1
2
What i need is, if classes matrix include x it should say "Matrix 'classes' include x value" ,else "Matrix 'classes' do not include x value".
The challanging think is comparing x with any of the classes members without using for or while loops.

답변 (1개)

James Tursa
James Tursa 2019년 12월 18일
Hints: What does this result give you:
classes == x
Then look at this:
doc any
  댓글 수: 3
James Tursa
James Tursa 2019년 12월 18일
Type it into the command line and see what happens ...
You might also try:
doc ismember
betul uslu
betul uslu 2019년 12월 18일
thank you for documnetation :D

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by