Re: Strange behaviour of <=?



"us " <us@xxxxxxxxxxxxxxx> wrote in message <gvlk22$6q8$1@xxxxxxxxxxxxxxxxxx>...
"Mattias " <mattias_winterdahl@xxxxxxxxxxxx> wrote in message <gvljmq$a4s$1@xxxxxxxxxxxxxxxxxx>...
Hi everyone! I have a problem I hope someone could help me with.

I have a vector from which I want to store the values below some percentile. So I tried both quantile() and prctile() like this:

quant_q = quantile(Q, quantile_lim);

while i <= length(Q)
if Q(i) <= quant_q
base_q(j) = Q(i);
...

The strange thing is that I only get values like 0.7000, 0.8000, 0.3000 though I know I have values that are below my quantile limit with another "decimal form", e.g. 0.7422. Why do I only get decimal values that end in zeros? Does anyone know why I get this strange behaviour? I would very much appreciate any help on this!

/MW

can you produce a copy/paste-able example of typical SMALL data set and a complete loop...

us

Thanks! It was the original data file that was a little bit screwed up. Thank you for your help! :)
.



Relevant Pages

  • Re: Mathematicas Quantile[] vs. Matlabs prctile()
    ... I've been calculating the 5th percentile of some data in Mathematica using ... the Quantile[] function. ... The help text for the PRCTILE function in MATLAB indicates ... and 87.5th percentile and performs linear interpolation to determine the ...
    (sci.math.symbolic)
  • Re: Strange behaviour of <=?
    ... I have a vector from which I want to store the values below some percentile. ... So I tried both quantile() and prctile() like this: ...
    (comp.soft-sys.matlab)
  • Re: Strange behaviour of <=?
    ... I have a vector from which I want to store the values below some percentile. ... So I tried both quantile() and prctile() like this: ... can you produce a copy/paste-able example of typical SMALL data set and a complete loop... ...
    (comp.soft-sys.matlab)
  • Strange behaviour of <=?
    ... I have a vector from which I want to store the values below some percentile. ... So I tried both quantile() and prctile() like this: ...
    (comp.soft-sys.matlab)