フィルターのクリア

How to find the number of values that are odd?

2 ビュー (過去 30 日間)
Kelara Ghaly
Kelara Ghaly 2020 年 6 月 16 日
コメント済み: Ron Mahabir 2021 年 3 月 18 日
How do you write a matlab code to find the number of values that are odd mutliples of 11 or 13?
  3 件のコメント
madhan ravi
madhan ravi 2020 年 6 月 16 日
Did you try anything?
David Hill
David Hill 2020 年 6 月 16 日
(1:2:19)*11;%odd multiples of 11

サインインしてコメントする。

回答 (1 件)

Andrey Smolyakov
Andrey Smolyakov 2020 年 6 月 16 日
If I understand you correctly, you may try something like this:
x = 120:230;
m = x((mod(x,11)==0 | mod(x,13)==0) & mod(x,2)==1);
  11 件のコメント
Rik
Rik 2021 年 3 月 17 日
@Ron Mahabir Do you still requestion deletion of the two answers? If not, feel free to remove the flags. I could also do that, but I would prefer it if you did.
Ron Mahabir
Ron Mahabir 2021 年 3 月 18 日
Thanks @Rik, I think its worth keeping the discussion so I'll remove the flag.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by