Group Abstract Group Abstract

Message Boards Message Boards

0
|
12.3K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

3D List plot from a 2D array (Matrix)?

Posted 8 years ago
POSTED BY: Erdem Uguz
6 Replies
Posted 8 years ago
POSTED BY: Erdem Uguz
Posted 8 years ago

I believe this is what you want. Replace 21 by 3.

xcoor = Range[1, 2, 1/20];
ycoor = Range[3, 4, 1/30];
coor = Tuples[{xcoor, ycoor}];
points = Partition[Flatten@Thread[{coor, Total /@ coor}], 3];
ListPointPlot3D[points]
POSTED BY: Okkes Dulgerci
Posted 8 years ago

This is exactly I was looking for thank you.

POSTED BY: Erdem Uguz
Posted 8 years ago

Is this what you are looking for?

coor = Tuples[{Range[1, 2, 1/2], Range[3, 4, 1/2]}];
ListPointPlot3D[ Partition[Thread[{coor, Total /@ coor}] // Flatten, 3]]
POSTED BY: Okkes Dulgerci
Posted 8 years ago

Okay maybe I did not pose the question well enough.

xcoor = Range[1, 2, 1/2];
ycoor = Range[3, 4, 1/2];
(x + y /. x -> xcoor) /. y -> ycoor

I want to be able to plot the matrix as data point with respect to xcoor and ycoor. Each point in the matrix has corresponding coordinates. I can't use the function directly (in this example x+y) . I have to use the matrix values.

POSTED BY: Erdem Uguz
POSTED BY: Ivan Siahlo
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard