MATLAB Answers

Janani Chander

Polyval gives me a error

Asked by Janani Chander
on 26 Jun 2013


Can you please tell me what is this error. I am using Matlab R2013 a. I have

      g= fit(z',y,'poly1');
      t1 = polyval(g,0.001).
 when I run this code  in matlab, I get this error

|_**Undefined function 'filter' for input arguments of type 'cfit'.

Error in polyval (line 57) y = filter(1,[1 -x],p);

Error in finite_size_scaling_cchargegap (line 50) t1 = polyval(g,0.001)**_|




No products are associated with this question.

2 Answers

Answer by Andrei Bobrov
on 26 Jun 2013
 Accepted answer

t1 = feval(g,0.001)

  1 Comment

Thanks , this works.

Answer by David Sanchez
on 26 Jun 2013

Try this out:

g= fit(z',y,'poly1');
P=[g.p1 g.p2];
t1 = polyval(P,0.001)


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!