Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Andre Ged
Andre Ged el 3 de Nov. de 2022
Comentada: Andre Ged el 3 de Nov. de 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

Respuesta aceptada

Jan
Jan el 3 de Nov. de 2022
Editada: Jan el 3 de Nov. de 2022
any(v)
% If n is not the number of elements:
any(v(1:n))

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by