convert to integer numbers
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammed Abdul Wadood
am 10 Apr. 2020
Kommentiert: Mohammed Abdul Wadood
am 12 Apr. 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 Kommentare
Akzeptierte Antwort
per isakson
am 11 Apr. 2020
Bearbeitet: per isakson
am 11 Apr. 2020
There are four different functions, which round to whole numbers
- round Round to nearest decimal or integer
- ceil Round toward positive infinity
- fix Round toward zero
- floor Round toward negative infinity
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
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!