I have an array (made by polyfit) which has 2 values P = polyfit(n,q,1). what i want is to use the outputted values separately i.e as P will have 2 values i want to make it into 2 sub variables x and y (gradient and intercept)

 採用された回答

Star Strider
Star Strider 2017 年 10 月 21 日

0 投票

Reading the documentation, you will find that:
Gradient = P(1);
Intercept = P(2);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Matrices and Arrays についてさらに検索

タグ

質問済み:

2017 年 10 月 21 日

回答済み:

2017 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by