Given a function f[x_,y_,z_,a_]:=x^2 + xy+ yz + z^3+a^2
(just for example), I want to randomly choose values of x,y,z,a
(with constraints that all $x,y,z$, and $a$ are positive, and Sqrt[x^2+y^2+z^2]<=1
) and plot f[x,y,z,a]
against Sqrt[x^2+y^2+z^2]
for say 100 points $(x,y,z,a)$. I am sure this is doable in Mathematica, but have no idea how to proceed.
How to generate large number of data points of a function and plot them?
seeker
- 577
- 2
- 7