How to find the number of values that are odd?

1 次查看(过去 30 天)
How do you write a matlab code to find the number of values that are odd mutliples of 11 or 13?

回答(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 CenterFile Exchange 中查找有关 Introduction 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