ave_atom.m

Contents

Version

2.11

Contact

Please report problems/bugs to michael.holmboe@umu.se

Examples

function atom = ave_atom(atom)

for i=1:max([atom(:).molid])
    ind=find([atom.molid]==i);
    [atom(ind).ave_x]=deal(mean([atom(ind).x]));
    [atom(ind).ave_y]=deal(mean([atom(ind).y]));
    [atom(ind).ave_z]=deal(mean([atom(ind).z]));
end

assignin('caller','X_ave',mean([atom.x]));
assignin('caller','Y_ave',mean([atom.y]));
assignin('caller','Z_ave',mean([atom.z]));