To remove part of the string while writing in a text file
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Vishwas
el 2 de Dic. de 2022
Comentada: Vishwas
el 2 de Dic. de 2022
Hi, I am using the following sample code to write the string in a text file, however apart from the string, I am getting additional "..." in my output file. Could you please advice me on how to get rid of the "..." ? The code is as follows:
formatSpec = '\t%d km/h, %g g\t%s';
A1 = 80;
A2 = 0.2;
A3 = 'Long_Pre_Event.res';
str = sprintf(formatSpec,A1,A2,A3);
writematrix(str,strrep(A3,'.res','.logVDT'),'FileType','text')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1216837/image.png)
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!