private double getAverage(String s) {
		if (s == null || s.trim().equals(""))
			return 0;
		int n = model.getNumberOfParticles();
		Particle[] p = null;
		if (model instanceof MesoModel)
			p = ((MesoModel) model).getParticles();
		else
			p = ((AtomicModel) model).getAtoms();
		double value = 0;
		if ("rx".equalsIgnoreCase(s)) {
			value = Statistics.getMeanRx(0, n, p, true) * R_CONVERTER;
		} else if ("ry".equalsIgnoreCase(s)) {
			value = Statistics.getMeanRy(0, n, p, true) * R_CONVERTER;
		} else if ("vx".equalsIgnoreCase(s)) {
			value = Statistics.getMeanVx(0, n, p, true) * V_CONVERTER;
		} else if ("vy".equalsIgnoreCase(s)) {
			value = Statistics.getMeanVy(0, n, p, true) * V_CONVERTER;
		} else if ("rxsq".equalsIgnoreCase(s)) {
			value = Statistics.getMeanRx(0, n, p, true) * R_CONVERTER;
			value *= value;
		} else if ("rysq".equalsIgnoreCase(s)) {
			value = Statistics.getMeanRy(0, n, p, true) * R_CONVERTER;
			value *= value;
		} else if ("vxsq".equalsIgnoreCase(s)) {
			value = Statistics.getMeanVx(0, n, p, true) * V_CONVERTER;
			value *= value;
		} else if ("vysq".equalsIgnoreCase(s)) {
			value = Statistics.getMeanVy(0, n, p, true) * V_CONVERTER;
			value *= value;
		}
		return value;
	}