How to obtain the sum of series of a discrete-time signal?
조회 수: 12 (최근 30일)
이전 댓글 표시
I want to obtain the value for the below function in Matlab.
fs = 5000; %sampling frequency
N=250; %number of samples for 50ms time portion
ts=1/fs; %time interval between samples
t = linspace(0,0.05,N);
x = sin(2*pi*100*t)+0.7*cos(2*pi*500*t);
The x[n] is given above. y[n] is the denoised case of the white gaussian noise added x[n] signal.
I'have tried
F1=symsum((x(n)-y(n))^2/x(n)^2,n,0,N-1);
but it didn't work.
How can I define the x in terms of n?
댓글 수: 0
답변 (1개)
Hiro Yoshino
2021년 5월 25일
Do you intend to use Symbolic Math Toolbox?
In that case, you need to define your variables as follows:
syms x y n
before beginning to code that way.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!