if at least one number >

4 vues (au cours des 30 derniers jours)
Tomas
Tomas le 23 Nov 2013
Commenté : Tomas le 23 Nov 2013
I have A=[ 11 12 17]
number=13; W={}; if (A>=number)
W{1}{1}=A;
else
A;
end
I want it so that if there was at least one number in A > as number,then A stored in cell W
Thanks

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 23 Nov 2013
A=[ 11 12 17]
number=13;
W={};
if any(A>number)
W{1}=A;
end
  1 commentaire
Tomas
Tomas le 23 Nov 2013
Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Construct and Work with Object Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by