How to re-arrange data based on XY co-ordinates

2 views (last 30 days)
Good afternoon everyone,
I have a tedious problem at the moment whereby I am having to manually re-arrange nodes and the corrosponding data based on its XY co-ordinates on its XY positional hierarcy as unfortunately the nodal numbers (and associated data) to do not corrospond in a logical manner. I have tried doing this in excel and matlab but it is unable to sort the two sequentally based on the above.
Attached is a picture of the mesh and associated test data
If you note that after node 40 the normal sequencing of numbers changes resulting in my manual intervention, whereby XY(4,0) should 41 but is 42, 42 should be in pos. 41 and so on.
Can anyone help please?
  1 Comment
KSSV on 11 Jul 2019
The mesh seems good..the node number looks perfect...why you think there is a a problem?

Sign in to comment.

Answers (1)

Richard Rees
Richard Rees on 11 Jul 2019
Hi, I have to export this into Tecplot indirectly as the software is not directly compatible. The problem lies in me having to manually type in the connectively list for each node into TecPlot.
The exported data from the simulation is ordered in assending nodal order, the problem is that with TecPlot it reads in the data per row, hence is does not know that the data is not arranged incorrectly beyond node 40. If I didn't re-arrange the positions manually I would get a mesh like this (see attached).
Connectively list (applied in attachment) for element 34
CL = 42,43,48,47
What it needs to be is
CL = 41,42,47,46
The only why I can think of avoiding the manual shifting of nodes and the data in excel is to re-arrange everything based on the XY hieracy. The connectivity list between the




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by