0

enter image description here

Why is that error popping up?

I would like to know why the input argument is lacking

Did I write the expression for x wrong?

The expression for x is enter image description here

I tried modifying the expression for x and also the range of fplot, but I couldn't.

my_function=@(x)my_function((-x.^2)-(5.*x)-3+(exp.^x))

my_function =

  function_handle with value:

    @(x)my_function((-x.^2)-(5.*x)-3+(exp.^x))

>> fplot(my_function,[-5:5])
Error using fplot
Invalid parameter '-5 -4 -...'.
 
>> fplot(my_function,[-5 5])
Warning: Error updating FunctionLine.

 The following error was reported evaluating the
 function in FunctionLine update: Not enough input
 arguments.
 
>> fplot(my_function,[-5,5])
Warning: Error updating FunctionLine.

 The following error was reported evaluating the
 function in FunctionLine update: Not enough input
 arguments.
 
>> fplot(my_function,[-5,5,1])
Error using fplot
Invalid parameter '-5  5  1'.
 
>> fplot(my_function,(-5,5))
 fplot(my_function,(-5,5))
                      ↑
Invalid expression. When calling a function or indexing
a variable, use parentheses. Otherwise, check for
mismatched delimiters.
 
>> fplot(my_function,[-5,5])
Warning: Error updating FunctionLine.

 The following error was reported evaluating the
 function in FunctionLine update: Not enough input
 arguments.
 


The issues to be addressed are:

Use the fplot function to plot the function over the range of x from -5 to +5.


1
  • Please edit to convert your images of text into actual text. See here for why. Commented Nov 6, 2022 at 6:56

1 Answer 1

2

exp is not a value, it is a function, and you are providing no inputs (hence the error message). exp.^x should be replaced by exp(x)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.