splitting numbers in a cell

1 次查看(过去 30 天)
Tshering Lhamo
Tshering Lhamo 2016-4-4
I have a cell like this: NODES
1.0000000008.00000000.000000000
2.0000000007.50000000.000000000
32.0000000010.0000000.000000000
42.5000000010.0000000.000000000
52.000000008.00000000.000000000
62.500000007.50000000.000000000
7.000000000.000000000.000000000
810.0000000.000000000.000000000
910.000000010.0000000.000000000
101.000000008.00000000.000000000
11.00000000010.0000000.000000000
121.0000000010.0000000.000000000
13.0000000009.50000000.000000000
141.000000009.50000000.000000000
152.000000009.50000000.000000000
162.500000009.50000000.000000000
1710.00000009.50000000.000000000
18.0000000007.87500000.000000000
19.0000000007.75000000.000000000
20.0000000007.62500000.000000000
212.1250000010.0000000.000000000
222.2500000010.0000000.000000000
I need to separate the node number, x coord, y coord and z coord. I was wondering if there was a simple way of doing it. Thanks.

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-4
编辑:Azzi Abdelmalek 2016-4-4
If A is your matrix
x=A(:,1)
y=A(:,2)
z=a(:,3)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by