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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCurve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by