Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

how to use the compare signal in m-file (>/<)

3 visualizzazioni (ultimi 30 giorni)
mayuresh
mayuresh il 25 Lug 2012
Chiuso: MATLAB Answer Bot il 20 Ago 2021
m-file

Risposte (1)

Walter Roberson
Walter Roberson il 25 Lug 2012
If you are comparing vectors or arrays, please be sure to note this behavior of if
An evaluated expression is true when the result is nonempty and contains all nonzero elements (logical or real numeric). Otherwise, the expression is false.
So when you have
if A < B
and A or B is a vector (or a matrix) then the "if" is only considered true if all A < B are true.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by