Without knowing the viewing capacity of the eye, the only answer you can give is a function of the optimal viewing distance $\displaystyle y$ as the maximal viewing angle $\displaystyle \alpha$ changes.
$\displaystyle y = \frac{230}{tan\alpha}$
Well if you know what the maximum viewing angle $\displaystyle \alpha$ is, then you simply input it into the function and you'll get the optimal viewing distance $\displaystyle y$.
So if $\displaystyle \alpha = \frac{\pi}{4}$, then $\displaystyle y = \frac{230}{tan\frac{\pi}{4}} = 230$ cm
let $\displaystyle \alpha$ be the angle of elevation from eye level to the bottom of the painting.
let $\displaystyle \theta$ be the angle from the bottom of the painting to the top of the painting, i.e. the viewing angle.
let x be the horizontal distance to the wall in meters.
then ...
$\displaystyle \alpha = \arctan\left(\frac{0.3}{x}\right)$
$\displaystyle \theta + \alpha = \arctan\left(\frac{2.3}{x}\right)$
so ...
$\displaystyle \theta = \arctan\left(\frac{2.3}{x}\right) - \arctan\left(\frac{0.3}{x}\right)
$
$\displaystyle \frac{d\theta}{dx} = \frac{\frac{-2.3}{x^2}}{1 + \frac{5.29}{x^2}} - \frac{\frac{-0.3}{x^2}}{1 + \frac{0.09}{x^2}} = \frac{-2.3}{x^2+5.29} + \frac{0.3}{x^2 + 0.09}$
setting $\displaystyle \frac{d\theta}{dx}$ = 0 yields the equation ...
$\displaystyle \frac{2.3}{x^2+5.29} = \frac{0.3}{x^2 + 0.09}$
solve for x ...
$\displaystyle x = 0.83$ meters