splitting numbers in a cell

조회 수: 1 (최근 30일)
Tshering Lhamo
Tshering Lhamo 2016년 4월 4일
편집: Azzi Abdelmalek 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에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by