Using CONVERGE Column format output file in mathlab
Show older comments
Dear friends,
I have a matrix with 7 column, which are:
% x y z volume u v w
data = [
5.4290000e-002 1.2000001e-002 -4.9610499e-002 5.1200019e-007 -1.9077557e+000 8.6310053e+000 1.7610728e+000
6.2290000e-002 4.0000002e-003 -4.9610499e-002 5.1199995e-007 -4.3041107e-001 6.8699613e+000 1.7610728e+000
6.2290000e-002 1.2000001e-002 -5.7610501e-002 5.1199995e-007 -1.2512736e+000 6.6148076e+000 2.0450566e+000
5.4290000e-002 1.2000001e-002 -4.1610500e-002 5.1199995e-007 -1.9077557e+000 8.6310053e+000 1.4770888e+000
6.2290000e-002 4.0000002e-003 -4.1610500e-002 5.1199972e-007 -4.3041107e-001 6.8699613e+000 1.4770888e+000
5.4290000e-002 1.2000001e-002 -3.3610500e-002 5.1200019e-007 -1.9077557e+000 8.6310053e+000 1.1931050e+000
6.2290000e-002 4.0000002e-003 -3.3610500e-002 5.1199995e-007 -4.3041107e-001 6.8699613e+000 1.1931050e+000
5.4290000e-002 1.2000001e-002 -2.5610500e-002 5.1200007e-007 -1.9077557e+000 8.6310053e+000 9.0912110e-001
6.2290000e-002 4.0000002e-003 -2.5610500e-002 5.1199983e-007 -4.3041107e-001 6.8699613e+000 9.0912110e-001
5.4290000e-002 1.2000001e-002 -1.7610500e-002 5.1200013e-007 -1.9077557e+000 8.6310053e+000 6.2513727e-001
6.2290000e-002 4.0000002e-003 -1.7610500e-002 5.1199989e-007 -4.3041107e-001 6.8699613e+000 6.2513727e-001
5.4290000e-002 1.2000001e-002 -9.6105000e-003 5.1200007e-007 -1.9077557e+000 8.6310053e+000 3.4115338e-001
5.4290000e-002 4.0000002e-003 -9.6105000e-003 5.1200007e-007 -6.6662008e-001 9.0477009e+000 3.4115338e-001
5.4290000e-002 -4.0000002e-003 -9.6105000e-003 5.1200007e-007 6.6662008e-001 9.0477009e+000 3.4115338e-001
6.2290000e-002 -1.2000001e-002 -9.6105000e-003 5.1199983e-007 1.2512736e+000 6.6148076e+000 3.4115338e-001
5.4290000e-002 -4.0000002e-003 -1.7610500e-002 5.1200013e-007 6.6662008e-001 9.0477009e+000 6.2513727e-001
6.2290000e-002 -1.2000001e-002 -1.7610500e-002 5.1199989e-007 1.2512736e+000 6.6148076e+000 6.2513727e-001
5.4290000e-002 -4.0000002e-003 -2.5610500e-002 5.1200007e-007 6.6662008e-001 9.0477009e+000 9.0912110e-001
];
I am trying to show last three columns (UVW) in XYZ which are first three columns,
3 Comments
Walter Roberson
on 28 Jul 2019
? Do you mean something other than
last3 = data(:, end-2:end);
I suspect that the last digit of the last w entry is missing, as you only have two 0's after the exponent, whereas all of the other values have 3 digits after the exponent.
Alireza Kakoee
on 28 Jul 2019
Walter Roberson
on 28 Jul 2019
Text files can be read in as character vectors, which can be stored into a character matrix by regular indexing.
A lot of the time it makes more sense to use readtable()
Answers (1)
Categories
Find more on Descriptive Statistics and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!