how to read the txt file and plot the graph

댓글 수: 1

Raj
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
Yuliano Moscoso Yarin 2019년 7월 1일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2019년 5월 17일

답변:

2019년 7월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by