How to import data from .txt file?
Mostrar comentarios más antiguos
Hi All,
Ive tried importing my data via this code;
Spill = importdata('Spill.txt');
T = Spill(:,1);
C = Spill(:,2);
plot(T,C)
xlabel('Time / Days');
ylabel('Concentration / ppb')
but it doesn't work as it says "Index exceeds matrix dimensions.". It needs to be inputted by code and not just the import button. Can someone help? Ive attached the .txt file
Respuesta aceptada
Más respuestas (2)
ghozy shalahuddin
el 10 de Oct. de 2019
0 votos
vh
parham kianian
el 2 de Sept. de 2020
0 votos
I think it is much easier to use textread function. Following link describe in full detail how to use this function to import data from a text file:
1 comentario
Jan Babiuch-Hall
el 3 de Mayo de 2022
Video unavailale :(
Categorías
Más información sobre Data Import and Analysis 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!