Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Comparing any of the matrix input

1 visualización (últimos 30 días)
betul uslu
betul uslu el 18 de Dic. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (1)

James Tursa
James Tursa el 18 de Dic. de 2019
Hints: What does this result give you:
classes == x
Then look at this:
doc any
  3 comentarios
James Tursa
James Tursa el 18 de Dic. de 2019
Type it into the command line and see what happens ...
You might also try:
doc ismember
betul uslu
betul uslu el 18 de Dic. de 2019
thank you for documnetation :D

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by