Message Boards Message Boards

0
|
3910 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Applying Function (RegionCentroid) on Spreadsheet

Posted 8 years ago

Hello,

I want to apply the function RegionCentroid on an excel spreadsheet with the x,y,z-coordinates of 4 points. Can you kindly explain the procedure step by step?

Looking forward to your soon support.

POSTED BY: Mr Pink
4 Replies
Posted 8 years ago

Thanks Peter Fleck my issue is now fixed. I had the coordinates p1x, p1y, ... p4z in the columns of the excel spreadsheet. the rows give the coordinates for every moment. The following code solved the issue: data = Import["/name.xlsx"] RegionCentroid[Polygon[Partition[#, 3]]] & /@ First[data]

POSTED BY: Mr Pink

I'm not sure what that means. What does your data look like after you import it to Mathematica? Can you show me for an example for a simple dataset?

POSTED BY: Sean Clarke
Posted 8 years ago

I am using normal Mathematica. The problem is to separate the columns. i´ve got an excel sheet with "(x1;y1,z1;x2;y2;z2;x3;y3;z3;x4;y4;z4)" but I need every single value in a bracket imported in mathematica, to be able to combine designated entires.

POSTED BY: Mr Pink

Are you using ExcelLink? Or just normal Mathematica?

If you are using normal Mathematica, you will need to export your data and then import the data into Mathematica first.

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

Group Abstract Group Abstract