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 个评论

Is "using if statements" a requirement?
Well, it's not required, but I was hoping to learn how to solve it using "if statements".
Anyway, thank you very much

请先登录,再进行评论。

 采纳的回答

per isakson
per isakson 2020-4-11
编辑:per isakson 2020-4-11

0 个投票

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 个评论

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.

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息

产品

版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by