median_atom.m

Contents

Version

2.11

Contact

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

Examples

function atom = median_atom(atom)

for i=1:max([atom(:).molid])
    ind=find([atom.molid]==i);
    [atom(ind).med_x]=deal(median([atom(ind).x]));
    [atom(ind).med_y]=deal(median([atom(ind).y]));
    [atom(ind).med_z]=deal(median([atom(ind).z]));
end