Borrar filtros
Borrar filtros

How to find the number of values that are odd?

2 visualizaciones (últimos 30 días)
Kelara Ghaly
Kelara Ghaly el 16 de Jun. de 2020
Comentada: Ron Mahabir el 18 de Mzo. de 2021
How do you write a matlab code to find the number of values that are odd mutliples of 11 or 13?
  3 comentarios
madhan ravi
madhan ravi el 16 de Jun. de 2020
Did you try anything?
David Hill
David Hill el 16 de Jun. de 2020
(1:2:19)*11;%odd multiples of 11

Iniciar sesión para comentar.

Respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by