필터 지우기
필터 지우기

how do you Calculate the amplitude of the signal for a period of 1 second

조회 수: 1 (최근 30일)
Adrison Cardozo
Adrison Cardozo 2017년 12월 14일
편집: Harish Ramachandran 2017년 12월 20일
hi
  댓글 수: 3
Adrison Cardozo
Adrison Cardozo 2017년 12월 14일
The question goeslike this so i have to analyze the signal changes in time for that, write a script that calculates the maximum and minimum values of the signal.
The values are c=0 C1=0.1155 C2=0.3417 C3=0.1789 C4=0.1232 C5=0.0678 C6=0.0473 C7=0.0260 C8=0.0045 C9=0.0020
Adam
Adam 2017년 12월 14일
And what is your problem with doing it? People aren't (usually) going to just do it for you without you showing any effort.

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

답변 (1개)

Harish Ramachandran
Harish Ramachandran 2017년 12월 20일
편집: Harish Ramachandran 2017년 12월 20일
This is a very trivial implementation of calculating max / min values of signal amplitude (sine in this case) at a particular time interval. This should be a good starting point to customize for your purpose.
step = 0.2; %step for time
ll = 0; %lower limit of time
ul = 5; %upper limit of time
t = ll:step:ul; %time function
f = sin(t); %sine function for reference - can be replaced with your equivalent
interval = 1; %get max and min at interval (default = 1)
x = 1:(interval/step):max(size(f)); %calculate the indices when the switch in indices to the next interval will happen
for i=1:1:max(size(x))-1 %loop through and obtain the mx and mn values
mx(i) = max(f(x(i):1:x(i+1)-1));
mn(i) = min(f(x(i):1:x(i+1)-1));
end
mx and mn contain the values of the maximum and minimum values at time (0:1:5)
Henceforth while posting a question, please provide details of the use case and your initial effort. Thank you.

카테고리

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

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by