필터 지우기
필터 지우기

How to compute frequency and amplitude from a text file?

조회 수: 1 (최근 30일)
Akshat Shrivastava
Akshat Shrivastava 2018년 8월 2일
댓글: Bob Thompson 2018년 8월 3일
So far, i have used this code to plot the text file:
[fid,msg] = fopen('Rose.txt','rt');
assert(fid>=3,msg)
C = textscan(fid, '%f%f', 'CommentStyle','#', 'CollectOutput',true);
fclose(fid);
M = C{1};
After this i wish to calculate frequency and amplitude for a duration of 5 seconds at different intervals. Can someone please help me out with the code in order to do so? Thanks in advance :)
  댓글 수: 5
Akshat Shrivastava
Akshat Shrivastava 2018년 8월 3일
Hi, I want to tell you that the plot that i get of my text file is not a sine or a cos waveform. Also, i do not know my sampling frequency. Would that link still be useful?`
Bob Thompson
Bob Thompson 2018년 8월 3일
Does your data have some kind of time based oscillation? If so then you can use an FFT tool. As for sampling frequency, there should be some way of finding out, but you can always just pick something and get relative results based on the frequency you picked.
Yes, the link is still useful.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by