how to read read a specific rows in .txt and put it in class?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
EDWARD IJAU PELIAS POG
le 31 Mar 2019
Commenté : EDWARD IJAU PELIAS POG
le 1 Avr 2019
Hi. i had 10X10000 matrix in my .txt file. how to read 2 specific rows and put it in one class? below is my coding.
load ('.txt'); %open the .txt file
% Class 1
x1 = [row1];
y1 = [row6];
class1 = [x1 y1];
% Class 2
x2 = [row2];
y2 = [row7];
class2 = [x2 y2];
since my row have 10000 of numbers, its hard to key in the number one by one. Is there any method to scan the row and put it automatically inside the x1,y1,x2,y2?Thanks..
Réponse acceptée
per isakson
le 31 Mar 2019
The problem is caused by the first character of line 11. It's char(26)
The function readtable() reads the file

Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!