read data and plotting graph
11 次查看(过去 30 天)
显示 更早的评论
how to read the txt file and plot the graph
1 个评论
Raj
2019-5-17
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?
回答(1 个)
Yuliano Moscoso Yarin
2019-7-1
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!