Your second form relies upon whatever Px happens to be in memory, and will fail if Px is not a scalar.
Possibly what you meant to post was
ezplot('(16*(-(((27*Px)/2 - 65625)*((27*Px)/2 + 65625))/4)^(1/2))/27',[3000,5000])
When I try that, the output is identical to plotting with your f anonymous function.
When I use your f anonymous function, ezplot gives a warning about f not being vectorized. You can remove that by vectorizing it:
f=@(Px) (16*(-(((27*Px)/2 - 65625).*((27*Px)/2 + 65625))/4).^(1/2))/27;
The output is the same exactly as for the non-vectorized version, and the same exactly as for the string version.