1
$\begingroup$

If I have a function:

f[x_, y_, z_, d_] = 4 x + y + z + d;

and made lists for f for different values of the free parameters x,y,z,d, by

T := Table[f[x, y, z, d], {x, 2, 5, 1}, {y, 2, 6, 2}, {z, 5, 10, 1}, {d, 3, 7, 1}]

How to plot f[x, y, z, d] versus any coulomb of the table, i.e., x, y, z or d ..

** Edit **

So why ListPlot dosn't work if I one more than two varibles change, i.e., for

T = Table[{x, If[-50 < DC[x, y] < 50, sigma[x, y, z, d]]}, {x, -5, -2, 1}, {y, 2, 6, 1}, {z, 6, 9, 1}, {d, 2, 9, 1}];

ListPlot[T] stuck ..

$\endgroup$
  • 3
    $\begingroup$ Table[ { x, Table[ f[x, y, z, d] } ... ]? $\endgroup$ – Kuba Jun 8 '16 at 5:48
  • 1
    $\begingroup$ Just to explain @Kuba 's comment datax = Table[ { x, Table[ f[x, y0, z0, d0] }, {x,2,5,1} ] and you have to use specific value y0,z0,d0 for y,z,d. Then use ListPlot[datax]. Since you have an analytical expression you can also use Plot[f[x,y0,z0,d0],{x,2,5}]. $\endgroup$ – Sumit Jun 8 '16 at 9:57
1
$\begingroup$

You can plot your stuff like so:

Manipulate[ContourPlot3D[Norm[{4 x + y + z + d}], 
{x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
ContourStyle -> (Directive[Opacity[.3, #]] & /@ {Red, Green, Cyan}),
Contours -> {1, 2, 3}, MeshStyle -> None], {d, -1, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ Please see my question, I edit .. $\endgroup$ – S.S. Jun 8 '16 at 14:20
0
$\begingroup$

Description

Below you will find two examples.

  • Example No.1 shows how to process function using a set of lists as
    input parameters (per column basis).

  • Example No.2 shows how to process function using all possible
    combinations of passed parameters; in your example it is {x,y,z,d}

Example 1:

(*data*)
x = {2, 5, 1};
y = {2, 6, 2};
z = {5, 10, 1};
d = {3, 7, 1};

(*operation*)
Thread[f[x, y, z, d]];

Example 2:

(*operation*)
Outer[f, x, y, z, d];
$\endgroup$
  • $\begingroup$ So, you want to plot a function of 4 independent variables in 3D space ? The only way seems to be by ListContourPlot3D $\endgroup$ – Lotus Jun 8 '16 at 9:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.