I am trying to use load syntax to load this txt file into matlab matrix (nX6)

1 commentaire

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

Connectez-vous pour commenter.

 Réponse acceptée

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

2 commentaires

Jennifer Good
Jennifer Good le 8 Déc 2023
This worked! Thanks!
Les Beckham
Les Beckham le 8 Déc 2023
You are quite welcome.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange

Produits

Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by