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)

 Respuesta aceptada

Star Strider
Star Strider el 21 de Oct. de 2017
Reading the documentation, you will find that:
Gradient = P(1);
Intercept = P(2);

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 21 de Oct. de 2017

Respondida:

el 21 de Oct. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by