Effacer les filtres
Effacer les filtres

Extract or import two Specific values form Text file

1 vue (au cours des 30 derniers jours)
Learner
Learner le 24 Juil 2018
Commenté : madhan ravi le 24 Juil 2018
I am working on a problem in MATLAB, in which I need to import two specific values (highlighted) from a text file as shown in the figure 1.
And corresponding txt file is attached below.
  2 commentaires
madhan ravi
madhan ravi le 24 Juil 2018
Upload your text file.
Learner
Learner le 24 Juil 2018
Text file attached

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 24 Juil 2018
Try this:
fid = fopen('M7_soil_FN_1.txt','rt');
C = textscan(fid,'%f%f','HeaderLines',6);
fclose(fid);
C{1}
C{2}
  2 commentaires
Learner
Learner le 24 Juil 2018
Yes, its working thank you very much...
madhan ravi
madhan ravi le 24 Juil 2018
You are welcome

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Export dans Help Center et File Exchange

Produits


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by