Effacer les filtres
Effacer les filtres

How to apply or operator on the components of a vector?

1 vue (au cours des 30 derniers jours)
Andre Ged
Andre Ged le 3 Nov 2022
Commenté : Andre Ged le 3 Nov 2022
Hello,
how can I apply the operator or || to the components of a vector v = [v(1) v(2) v(3)...v(n)], whose size is not known a priori, i.e.
v(1) || v(2) || v(3) || ... || v(n) with a general value of n.
Thanks

Réponse acceptée

Jan
Jan le 3 Nov 2022
Modifié(e) : Jan le 3 Nov 2022
any(v)
% If n is not the number of elements:
any(v(1:n))

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Tags

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by