convert to integer numbers

10 visualizaciones (últimos 30 días)
Mohammed Abdul Wadood
Mohammed Abdul Wadood el 10 de Abr. de 2020
Comentada: Mohammed Abdul Wadood el 12 de Abr. de 2020
if i calculate Q1, Q3 quartiles and the values ​​are shown as not integer, how can i convert it to integer by using (if statements), for example i am using this random numbers
x = 100 + rand(15,1) * 350
y = sort(x,1)
q1 = length(y) * 0.25
q3 = length(y) * 0.75
  2 comentarios
per isakson
per isakson el 10 de Abr. de 2020
Is "using if statements" a requirement?
Mohammed Abdul Wadood
Mohammed Abdul Wadood el 11 de Abr. de 2020
Well, it's not required, but I was hoping to learn how to solve it using "if statements".
Anyway, thank you very much

Iniciar sesión para comentar.

Respuesta aceptada

per isakson
per isakson el 11 de Abr. de 2020
Editada: per isakson el 11 de Abr. de 2020
There are four different functions, which round to whole numbers
In the Statistical toolbox there are
"how to solve it using "if statements"." I cannot think of a meaningful way to use an if-statement here
  1 comentario
Mohammed Abdul Wadood
Mohammed Abdul Wadood el 12 de Abr. de 2020
yes, I tried a lot to find a way to use if statements but I couldn't find it.
Thank you very much for helping me.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by