I'm trying to replicate the code for standard deviation in Matlab and...
Favorites|Homepage
Subscriptions | sitemap
HOME > Engineering > I'm trying to replicate the code for standard deviation in Matlab and...

I'm trying to replicate the code for standard deviation in Matlab and...

[From: ] [author: ] [Date: 11-09-11] [Hit: ]
naively, if it is called MEAN,will get what you want.The help function will tell you which function you want.I dont recall the name of the function, but I do remember that it returns an array containing the mean and variance.......
I was hoping that someone could tell me how I can subtract the mean (already coded) from each value in the array, and then sum all these values?

Even if you can only help me with the first part, I would really appreciate it. Thanks! =)

-
if your array is in x, then to subtract a scalar value c from every value in the array you can

1) x - c
2) x - c * ones(length(x))

(1) is the preferred method.

To compute the mean of the subsequent array, there is a function that will compute that. naively, if it is called MEAN, then

s = MEAN(x-c)

will get what you want.

The help function will tell you which function you want. I don't recall the name of the function, but I do remember that it returns an array containing the mean and variance.
1
keywords: and,standard,replicate,code,Matlab,039,for,in,trying,deviation,to,the,I'm trying to replicate the code for standard deviation in Matlab and...
New
Hot
© 2008-2010 http://www.science-mathematics.com . Program by zplan cms. Theme by wukong .