Quantcast
Channel: MATLAB Central Newsreader - tag:"mean"
Viewing all articles
Browse latest Browse all 26

Re: mean() and mean2()

$
0
0
"wanna mt" wrote in message <i8omcg$grr$1@fred.mathworks.com>...
> what is the differences of mean() and mean2()?is it mean() is specific for maths algorithm and mean2() is used for image processing?

The most important difference is mean2() will treat uint8 or other integer arrays as double, whereas mean(mean()) will not.

For example,
>> a=uint8(2);b=uint8(3);
>> mean(a,b)

ans =

     2
>> mean2([a,b;a,a])

ans =

    2.2500

Viewing all articles
Browse latest Browse all 26

Trending Articles