필터 지우기
필터 지우기

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