when i was plotting i reveived this error, please help me out....

조회 수: 1 (최근 30일)
SAI ARJUNKUMAR KADALI
SAI ARJUNKUMAR KADALI 2021년 10월 3일
답변: Jan 2021년 10월 3일
The following error was reported evaluating the function in FunctionLine update: Not enough input arguments.
fun = @(x) exp(-x) - 3.*x.^2 + 26
fplot(fun,[0 5])
grid on
  댓글 수: 4
Cris LaPierre
Cris LaPierre 2021년 10월 3일
I can only recreate the error in MATLAB Online if I modify your code so that the fun does not use x in the equation. Otherwise your code works fine. Perhaps you use fplot somewhere else in your code. Have you shared all your code?
fun = @(x) exp - 3.^2 + 26;
fplot(fun,[0 5])
grid on
Warning: Error updating FunctionLine.

The following error was reported evaluating the function in FunctionLine update: Not enough input arguments.
SAI ARJUNKUMAR KADALI
SAI ARJUNKUMAR KADALI 2021년 10월 3일
Yes I shared all the code

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2021년 10월 3일
For me it works:
fun = @(x) exp(-x) - 3.*x.^2 + 26
fun = function_handle with value:
@(x)exp(-x)-3.*x.^2+26
fplot(fun,[0 5])
grid on
So if this fails for you, you are running another code. maybe you have redefined exp()?

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by