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

2 次查看(过去 30 天)
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 个评论
KSSV
KSSV 2019-7-11
The mesh seems good..the node number looks perfect...why you think there is a a problem?

请先登录,再进行评论。

回答(1 个)

Richard Rees
Richard Rees 2019-7-11
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

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by