when i was plotting i reveived this error, please help me out....
Show older comments
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 Comments
Chetan Bhavsar
on 3 Oct 2021
Edited: Chetan Bhavsar
on 3 Oct 2021
I am not able to recreate the error,
what matlab version are you using?

SAI ARJUNKUMAR KADALI
on 3 Oct 2021
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
SAI ARJUNKUMAR KADALI
on 3 Oct 2021
Answers (1)
For me it works:
fun = @(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()?
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
