Using CONVERGE Column format output file in mathlab

조회 수: 25 (최근 30일)
Alireza Kakoee
Alireza Kakoee 2019년 7월 28일
댓글: Walter Roberson 2019년 7월 28일
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
Alireza Kakoee
Alireza Kakoee 2019년 7월 28일
last3 = data(:, end-2:end);
what do you mean?
how can insert a text file into matrix in mathalb?
Walter Roberson
Walter Roberson 2019년 7월 28일
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()

댓글을 달려면 로그인하십시오.

답변 (1개)

Alireza Kakoee
Alireza Kakoee 2019년 7월 28일
Hi, thank you for you answer, i am trying to shows contours of velocity (3 dimentional velocity) in domain of XYZ. last digits of last nuber is 1

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by