MATLAB Answers

Rob L
0

extract equation from cfit contents

Asked by Rob L
on 14 Jul 2014
Latest activity Answered by Shashank Prasanna on 14 Jul 2014
I have a fit object cfit for which I can access the coeffeicients by using coeffvalues.
I can also 'see' the model used but I wish to reconstruct the equation using coeffvalues and some method of extracting the equation used for fit - can this be extracted with some function equivalent to coeffvalues ?

  0 Comments

Sign in to comment.

1 Answer

Answer by Shashank Prasanna on 14 Jul 2014
 Accepted Answer

You can use the formula methods to access the formula you fit:
load census
f = fittype('poly2');
formula(f)

  0 Comments

Sign in to comment.