.txt string file loading problem
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Muhammad
el 31 de Mzo. de 2014
Editada: Jeff Johnson
el 2 de Abr. de 2014
Hi, I have a text file with 5 columns and 73 rows, and I creat this file from .xlsx format in excel. Now when I load this file with;
a = importdata('Input.txt')
this file is load in only 1 column instead for 5 columns, and the dimension of my my variable a is equal to 73*1. I separate the the input strings with tab and 8 spaces with nothing work for me.
Please guide me, I am new to MATLAB. Thanks in advanced.
0 comentarios
Respuesta aceptada
Jeff Johnson
el 2 de Abr. de 2014
Editada: Jeff Johnson
el 2 de Abr. de 2014
It looks like you need to add a delimiter argument to your function call. From the help documentation for importdata:
importdata(FILENAME, DELIM) interprets DELIM as the column separator in
ASCII file FILENAME. DELIM must be a string. Use '\t' for tab.
If your data is tab-separated, try
a = importdata('Input.txt','\t')
In the future, you can find the help documentation for any function by typing
help functionName
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!