2
$\begingroup$

Output of a Table

I have the following variable (see Picture). Note that it has 3 dimensions. In the example for the first row is

$\qquad (0, 0, 0.167588),\,(0 , 0.25, 0.171669),\,(0, 0.5, 0.172119), \,\ldots$

I need to plot this in a 3d Diagram. Therefore, I guess the variable has to be transformed in some way.

$\endgroup$
5
  • $\begingroup$ try this frankwf1 // Map[Thread] // Flatten[#, 1] & // ReplaceAll[{x_?NumericQ, {y_?NumericQ, z_?NumericQ}} :> {x, y, z}] $\endgroup$
    – Jason B.
    Commented Feb 23, 2018 at 17:50
  • $\begingroup$ or frankwf1 // ReplaceAll[ {x_?NumericQ, y : {{_?NumericQ, _?NumericQ} ..}} :> Sequence @@ Map[Prepend[x], y]] $\endgroup$
    – Jason B.
    Commented Feb 23, 2018 at 17:53
  • $\begingroup$ Due to the way you have your list setup, the first row isn't actually (0, 0, 0.167588) as you think. Look at the curly brackets. The first row's first element is zero, and the second element is a list of ordered pairs. Try to make sets of ordered triplets for your 3-dimensions, and that should plot easily in 3d. $\endgroup$
    – avikarto
    Commented Feb 23, 2018 at 18:09
  • 3
    $\begingroup$ Copy and Paste code (InputForm) into your question rather than pictures of code. This will facilitate getting help. $\endgroup$
    – Bob Hanlon
    Commented Feb 23, 2018 at 19:03
  • 1
    $\begingroup$ ArrayFlatten[list] (after Mr Wizard's answer) and possible duplicate $\endgroup$
    – user1066
    Commented Feb 23, 2018 at 21:38

1 Answer 1

3
$\begingroup$
ListPlot3D[ArrayFlatten[frankwf1]]

enter image description here

$\endgroup$

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