Hello everyone, how to write the code to calculate the similarity coefficient of two curves?Another problem is that when fitting a curve, the interval of a curve x is [-3,3], and it will exceed this interval when fitting a curve. I don’t know where t

1 次查看(过去 30 天)
code:
load jizuobiao1.mat
f1= fit(THETA11,RHO11,'smoothingspline','SmoothingParam',0.99);%smoothingspline
plot(f1,THETA11,RHO11)
load jizuobiao2.mat
f2 = fit(THETA12,RHO12,'smoothingspline','SmoothingParam',0.99);%smoothingspline
plot(f2,THETA12,RHO12)

回答(1 个)

KSSV
KSSV 2021-1-11
load jizuobiao1.mat
RHO11 = XX1 ;
THETA11 = linspace(-pi,+pi,length(RHO11))' ;
f1= fit(THETA11,RHO11,'smoothingspline','SmoothingParam',0.99);%smoothingspline
load jizuobiao2.mat
RHO12 = XX3 ;
THETA12 = linspace(-pi,+pi,length(RHO12))' ;
f2 = fit(THETA12,RHO12,'smoothingspline','SmoothingParam',0.99);%smoothingspline
%%
x = THETA11 ;
y1 = f1(x) ;
y2 = f2(x) ;
plotregression(y1,y2)
plot(x,y1,'r',x,y2,'b')
  3 个评论
KSSV
KSSV 2021-1-11
I have taken THETA11 and THETA12 to lie between (-pi,+pi), in your code you have not defined them. You have the code in hand, you can extend it to your input values.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by