如何计算此曲线异同指数?

时间:2018-09-26 08:50:46

标签: octave curve-fitting curve

我试图找到两条曲线的不相似性(以八度为单位)。这是四个索引(in the picture),它们表示哪个曲线接近参考曲线。其中,f是平滑的实验曲线,g是平滑的模型曲线。 “此处'D'是两个函数(f和g)的域之间的交集” [在论文中提到,Bernardi等,2016(https://www.sciencedirect.com/science/article/pii/S0010218016300360)]

我不知道这个D是什么以及如何实现它八度。

对于最后两个索引,我认为我的代码正在工作,但是对于前两个索引,我不知道如何编写代码。

样本

f = [4.8104; 5.2659; 5.6759; 6.0417; 6.3652; 6.6486; 6.8937; 7.1038; 7.2852; 7.4484; 7.6058; 7.7685; 7.9437; 8.1352; 8.3439; 8.5682; 8.8044; 9.0474; 9.2913; 9.5293; 9.7549; 9.9619; 10.1453; 10.3012; 10.4279; 10.5230; 10.5839; 10.6087; 10.5967; 10.5488; 10.4706; 10.3714; 10.2621; 10.1539; 10.0559; 9.9741; 9.9101; 9.8629; 8.4928; 8.6465; 8.8245; 9.0271; 9.2548; 9.5074];

g = [4.2276; 4.5210; 4.8175; 5.1154; 5.4091; 5.6903; 5.9487; 6.1785; 6.3847; 6.5778; 6.7685; 6.9622; 7.1602; 7.3602; 7.5573; 7.7454; 7.9172; 8.0661; 8.1865; 8.2758; 8.3352; 8.3683; 8.3798; 8.3736; 8.3514; 8.3141; 8.2622; 8.1973; 8.1230; 8.0442; 7.9668; 7.8972; 7.8419; 7.8066; 7.7962; 7.8147; 7.8643; 7.9456; 8.0573; 8.1961; 8.3581; 8.5386; 8.7331; 8.9373];

在这里。

%-----------------------------d0_p_pearson----------------------------------------
format long
dot_product_fg = dot(f,g);
norm_product_fg = (norm(f)*norm(g));
phase_in_radians_fg = (dot_product_fg/norm_product_fg);
phase_shift_in_radians_fg = acos(dot_product_fg/norm_product_fg);
d0_p_pre = sqrt((1-phase_in_radians_fg))/2;
%-----------------------------d1_p_pearson----------------------------------------
dot_product_fg_diff = dot(f_diff,g_diff);
norm_product_fg_diff = (norm(f_diff)*norm(g_diff));
phase_in_radians_fg_diff = (dot_product_fg_diff/norm_product_fg_diff);
phase_shift_in_radians_fg_diff = acos(dot_product_fg_diff/norm_product_fg_diff);
d1_p_pre = sqrt((1-phase_in_radians_fg_diff))/2;

这是'D'Losungen吗?

0 个答案:

没有答案