フィルターのクリア

Getting an error when using poly2sym

3 ビュー (過去 30 日間)
Muhammad Farooq Zia
Muhammad Farooq Zia 2018 年 7 月 23 日
I am trying to use curve fitting on a plot to get the equation of a fifth-degree polynomial. Everything is working fine but once I try to convert a column vector to a polynomial, the program just hangs and then I have to restart MATLAB. This is the part of the code related to curve fitting:
%CurveFitting
CFSw = table2array(T(:,2));
CFFw = table2array(T(:,6));
disp (CFSw),disp (CFFw),
fitpoly5=fit(CFSw,CFFw,'poly5');
% Plot the fit with the plot method.
figure
plot(fitpoly5,CFSw,CFFw)
% Move the legend to the top left corner.
legend('Location','NorthWest' );
xlabel('Sw')
ylabel('Fw')
disp (fitpoly5),
coeffvals = coeffvalues(fitpoly5);
disp(coeffvals),
C = coeffvals.';
disp (C),
% p = poly2sym(sym(C));
p = poly2sym(C);
disp (p),

採用された回答

Walter Roberson
Walter Roberson 2018 年 7 月 23 日
  1 件のコメント
Muhammad Farooq Zia
Muhammad Farooq Zia 2018 年 7 月 23 日
thanks a lot.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by