Load .txt file into matrix form

3 次查看(过去 30 天)
I am trying to use load syntax to load this txt file into matlab matrix (nX6)
  1 个评论
Voss
Voss 2023-12-8
X = load('X_deg_10.txt')
X = 302×7
1.0e+06 * 0 6.7800 0.1000 0.2000 -0.0001 0.0081 -0.0002 0 6.7800 0.1000 0.2000 -0.0001 0.0081 -0.0002 0.0000 6.7756 0.2810 0.1955 -0.0003 0.0081 -0.0002 0.0000 6.7669 0.4619 0.1908 -0.0005 0.0081 -0.0002 0.0001 6.7538 0.6424 0.1860 -0.0007 0.0081 -0.0002 0.0001 6.7365 0.8226 0.1811 -0.0009 0.0080 -0.0002 0.0001 6.7148 1.0022 0.1761 -0.0011 0.0080 -0.0002 0.0001 6.6889 1.1812 0.1710 -0.0013 0.0080 -0.0002 0.0002 6.6587 1.3594 0.1657 -0.0014 0.0080 -0.0002 0.0002 6.6243 1.5368 0.1604 -0.0016 0.0079 -0.0002

请先登录,再进行评论。

采纳的回答

Les Beckham
Les Beckham 2023-12-8
That looks like a good candidate for readmatrix.
mtx = readmatrix('X_deg_10.txt');
size(mtx)
ans = 1×2
302 7

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by