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 view (last 30 days)
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)

Answers (1)

KSSV
KSSV on 11 Jan 2021
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 Comments
KSSV
KSSV on 11 Jan 2021
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.
Wesley
Wesley on 11 Jan 2021
I'm really sorry, I still don't know how to solve this problem. Please further explain how to write the code.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!