Constant error plotting function

조회 수: 1 (최근 30일)
Gavin Seddon
Gavin Seddon 2016년 5월 19일
댓글: Gavin Seddon 2016년 5월 20일
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.

채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 19일
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])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by