How to export a fourier series in its function form after using the curve-fitting method?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have constructed the following fitting for some periodic data y(:,1), so
theta_fit = fit(t,y(:,1),'fourier8'),
theta_fit =
General model Fourier8:
theta_fit(x) =
a0 + a1*cos(x*w) + b1*sin(x*w) +
a2*cos(2*x*w) + b2*sin(2*x*w) + a3*cos(3*x*w) + b3*sin(3*x*w) +
a4*cos(4*x*w) + b4*sin(4*x*w) + a5*cos(5*x*w) + b5*sin(5*x*w) +
a6*cos(6*x*w) + b6*sin(6*x*w) + a7*cos(7*x*w) + b7*sin(7*x*w) +
a8*cos(8*x*w) + b8*sin(8*x*w)
I know I can plot them using
plot(t,theta_fit(t),'r')
But then how do I extract theta_fit(x) as a symbolic functio, such that I can use theta_fit(t) in some other programs?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!