Constant error plotting function

1 vue (au cours des 30 derniers jours)
Gavin Seddon
Gavin Seddon le 19 Mai 2016
Commenté : Gavin Seddon le 20 Mai 2016
when I use fplot I receive an error that the first constant that's already been used. I tried using @(varargin) command however I received the following errors:
fplot (@(varargin) p1*x^6 + p2*x^5 + p3*x^4 + p4*x^3 + p5*x^2 + p6*x + p7(varargin{0:4000}))
Error using fplot (line 51)
Not enough input arguments.
Will someone help with this problem?
Gavin.

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Mai 2016
I suspect you want
fplot (@(x) p1*x.^6 + p2*x.^5 + p3*x.^4 + p4*x.^3 + p5*x.^2 + p6*x + p7, [0, 4000])
  1 commentaire
Gavin Seddon
Gavin Seddon le 20 Mai 2016
Thanks Walter.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by