フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Program for the equation

1 回表示 (過去 30 日間)
Yuvaraj
Yuvaraj 2013 年 7 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
The input excel sheet contains 504 rows x 14 columns How to do Matlab program for the below equation? MF = sum (amplitude(f)*f)/sum (amplitude(f)) f = summation--varies from 0.5 to 3.9 Hz where, amplitude(f) associated with each of the frequencies (0.5 to 3.9). Kindly help me in this regard.

回答 (1 件)

dpb
dpb 2013 年 7 月 6 日
Presuming you've loaded the spreadsheet into two variables f and ampl,
MATL
MF=sum(ampl.*f)/sum(f);
If it's as an array of two columns, then just use the column indices instead
MATL
MF=sum(x(:,1).*x(:,2))/sum(x(:,1));
NB the .* to do element-by-element multiplication.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by