简体   繁体   中英

MATLAB Code: Help required on algorithm

I have the following code from my predecessor. I am unable to figure out what is the math that is happening here and how is the values avgCov and stdCov are different, and what they signify. Cprofile_f is a curve similar to gaussian curve, like a peak. Cprofile_f is an array of known size (5700). b1, d1 are index values. Usually, b1 is 2000, d1 is 4300.

         avgCov=sum(Cprofile_f(b1:d1))/(d1-b1)
         stdCov=0;
         for ii=b1:d1
             stdCov =stdCov + sqrt((avgCov - Cprofile_f(ii))^2);
         end 

         stdCov =1- stdCov/(d1-b1)/avgCov

Trying to figure out, what stdCov mean here.

Looks like it's computing the average (avgCov) and standard deviation (stdCov, sort of) in order to compute 1 minus the coefficient of variation (stored in stdCov).

https://en.wikipedia.org/wiki/Coefficient_of_variation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM