Azzera filtri
Azzera filtri

splitting numbers in a cell

1 visualizzazione (ultimi 30 giorni)
Tshering Lhamo
Tshering Lhamo il 4 Apr 2016
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.

Risposte (1)

Azzi Abdelmalek
Azzi Abdelmalek il 4 Apr 2016
Modificato: Azzi Abdelmalek il 4 Apr 2016
If A is your matrix
x=A(:,1)
y=A(:,2)
z=a(:,3)

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by