Clear Filters
Clear Filters

How to find the number of values that are odd?

2 views (last 30 days)
How do you write a matlab code to find the number of values that are odd mutliples of 11 or 13?

Answers (1)

Andrey Smolyakov
Andrey Smolyakov on 16 Jun 2020
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 Comments
Rik
Rik on 17 Mar 2021
@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 on 18 Mar 2021
Thanks @Rik, I think its worth keeping the discussion so I'll remove the flag.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!