Delimiter problems with =
Mostrar comentarios más antiguos
Good afternoon,
I'm using the following function:
filename=fullfile('ENTRADA.txt');
fileID=fopen(filename);
C=textscan(fileID,'%s %s','Delimiter','=','MultipleDelimsAsOne',1);
In order to get a 1x2 cell array (one with the name of the data and the other one with the corresponding data). All the names and the data are separated by "=" and that's why I put it as a Delimiter. The problem is that one of the data is "ZR[1].mat.comment=ISO 6336-5 Figure 9/10 (MQ), Core hardness >=25HRC Jominy J=12mm<HRC28". I would only want to make a separation after the first "=" but MATLAB makes it also for the second and the third "=". How could I fix it?
Thanks in advance!
2 comentarios
Stephen23
el 28 de Oct. de 2019
Remember to also fclose the file.
Sergio Vez
el 28 de Oct. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Text Data Preparation en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!