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

2 ビュー (過去 30 日間)
Andre Ged
Andre Ged 2022 年 11 月 3 日
コメント済み: Andre Ged 2022 年 11 月 3 日
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

採用された回答

Jan
Jan 2022 年 11 月 3 日
編集済み: Jan 2022 年 11 月 3 日
any(v)
% If n is not the number of elements:
any(v(1:n))

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by