read data and plotting graph
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Prawinth Gunasegaran
el 17 de Mayo de 2019
Respondida: Yuliano Moscoso Yarin
el 1 de Jul. de 2019
how to read the txt file and plot the graph
1 comentario
Raj
el 17 de Mayo de 2019
Reading data is not a problem. Use 'fopen' to open the file and 'fscanf' to read the data. Or you can use 'textscan' to read the full file as strings and then convert numeric strings to numbers. How do you want to plot the data?
Respuestas (1)
Yuliano Moscoso Yarin
el 1 de Jul. de 2019
as @Raj comment it depenes of the purpose of what you need , I can for example use the command "readtable"
sound = readtable('sound.txt');% this will work if this archive is in the same matlab directory
% then you can plot (notice that I'm using the variable name Var2 since your data has no variable names)
plot(sound.Var2)
![try.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/227081/try.jpeg)
0 comentarios
Ver también
Categorías
Más información sobre Audio and Video Data 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!