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

per isakson
per isakson 2020년 4월 10일
Is "using if statements" a requirement?
Mohammed Abdul Wadood
Mohammed Abdul Wadood 2020년 4월 11일
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

Mohammed Abdul Wadood
Mohammed Abdul Wadood 2020년 4월 12일
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에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by