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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by