help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behaviour of median and std


From: Marius Roets
Subject: Strange behaviour of median and std
Date: Wed, 17 Feb 2010 13:53:57 +0200

Hi everybody,

It took me an hour to get to the bottom of this. Can somebody please explain the output of this code to me.

b = [255 255 0; 255 255 255];
disp(b);
median(b(:))
std(b(:))
b = uint8(b)
median(b(:))
std(b(:))

Output:

   255   255     0
   255   255   255
ans =  255
ans =  104.10
b =

  255  255    0
  255  255  255

ans = 128
ans =  43

Thanks
Marius

reply via email to

[Prev in Thread] Current Thread [Next in Thread]