Ejaz
Electrical
- Dec 4, 2001
- 26
I've written the following code to calculate the Mean Values of x, y & z.
***************************************************************
for i=2:size(A) % A = column of input data
x(i) = % formula
y(i) = % formula
z(i) = % formula
end
Mean_x=mean(x); % mean value of all the values of x
Mean_y=mean
; % mean value of all the values of y
Mean_z=mean(z); % mean value of all the values of z
***************************************************************
With this code, the mean value is calculated for i=1:size(A)
taking x(1), y(1) & z(1) as 0. I need to calculate the mean for i=2:size(A), excluding x(1), y(1) & z(1). How can I do that? Thanks in advance!
***************************************************************
for i=2:size(A) % A = column of input data
x(i) = % formula
y(i) = % formula
z(i) = % formula
end
Mean_x=mean(x); % mean value of all the values of x
Mean_y=mean
Mean_z=mean(z); % mean value of all the values of z
***************************************************************
With this code, the mean value is calculated for i=1:size(A)
taking x(1), y(1) & z(1) as 0. I need to calculate the mean for i=2:size(A), excluding x(1), y(1) & z(1). How can I do that? Thanks in advance!