How can I export a CFIT class variable to Excel?

I am using the Curve Fitting Toolbox to create generate polynomials of the type CFIT. I want to export the polynomial and the coefficients outside MATLAB such that other users who do not have MATLAB can look at the polynomial.

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일

0 개 추천

You can export the polynomial and the coefficients using the dot operator and getting the polynomial expression as an array of characters:
% create a CFIT class variable
f = fittype('a*x^2+b*exp(n*x)')
c = cfit(f,1,10.3,-1e2)
%get the polynomial expression as a string array
p = fevalexpr(f);
%export the polynomial and its coefficients to an Excel sheet
xlswrite('example',{p;c.a;c.b;c.n});

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Polynomials에 대해 자세히 알아보기

제품

릴리스

R2007a

태그

Community Treasure Hunt

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

Start Hunting!

Translated by