How to program plots with models starting with table

https://www.mathworks.com/help/stats/linearmodel.plot.html provides a code example with loading dataset
load carsmall
Year = categorical(Model_Year);
tbl = table(MPG,Weight,Year);
mdl = fitlm(tbl,'MPG ~ Year + Weight^2');
But how can one program the above when one start from table T?

1 件のコメント

alpedhuez
alpedhuez 2020 年 7 月 8 日
mdl = fitlm(tbl,'MPG ~ Year + Weight^2');
plot(mdl);

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

回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2020 年 7 月 8 日

コメント済み:

2020 年 7 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by