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)

0 件のコメント
回答 (1 件)
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
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 Center および File Exchange で Curve Fitting Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!