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