MATLAB Answers

how to use matlab express the fomula

1 ビュー (過去 30 日間)


James Browne
James Browne 2019 年 6 月 28 日
Hi, I think I have a solution to your problem. It is difficult to determine what kinds of data are the inputs without seeing a sample of the data so I wrote the solution, assuming that Xk and Yk are vectors of length N. In your problem statement, N is 99,900, so then Xk and Yk should be vectors of length 99,900. I used shorter vecors in my code and subsequently, a smaller N value but all you should need to do is use your data and change N to be 99,900 and you should be fine.
The following is the solution that I came up with to implement the EVM equation in MATLAB:
%Since I do not have any example data, the following values were used for
%Xk, N, and Yk, simply change them with real data to implement the EVM
N = 5;
Xk = [1, 3, 2, 5, 10];
Yk = [7, 9, 3, 6, 2];
ek = Yk - Xk;
%The following calculations can be combined into a single line of code,
%however, I often find it useful for troubleshooting and understanding the
%algorithm to do the calculations in steps. The following is an example of
%an algorithm (the EVM equation) that is broken up into steps.
ek2 = ek.^2;
Xk2 = Xk.^2;
sigmaEk2 = sum(ek2);
sigmaXk2 = sum(Xk2);
EVM = 20*log10( sqrt( (1/N*sigmaEk2)/(1/N*sigmaXk2) ))

  1 件のコメント

long zhang
long zhang 2019 年 6 月 28 日
QQ图片20190628150600.png,,I think this part is also can be expressed as following:


その他の回答 (0 件)


Community Treasure Hunt

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

Start Hunting!

Translated by