What is the problem with the following anonymous function? my_fun=@(a,e,x) e^(-a.*x); b=0.5; e=exp(1); x=[0:0.1:10]; figure plot(x,my_fun(b,e,x))
What is the problem with the following anonymous function? my_fun=@(a,e,x) e^(-a.*x); b=0.5; e=exp(1); x=[0:0.1:10]; figure plot(x,my_fun(b,e,x))
Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter3: Functions And Graphs
Section: Chapter Questions
Problem 71RE
Related questions
Question
When you execute the above Matlab code, you will get an error message.
Please choose the reason why the presented Matlab code does not work.
a) Anonymous
b) The expression in the power might contain a
c) When calling an anonymous function, one has to use exactly the same names of the variables as in the definition
of the function.
d) It is not allowed to use the exp()-function in order to compute an value for the variable e beforehand.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Algebra for College Students
Algebra
ISBN:
9781285195780
Author:
Jerome E. Kaufmann, Karen L. Schwitters
Publisher:
Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Algebra for College Students
Algebra
ISBN:
9781285195780
Author:
Jerome E. Kaufmann, Karen L. Schwitters
Publisher:
Cengage Learning
College Algebra
Algebra
ISBN:
9781305115545
Author:
James Stewart, Lothar Redlin, Saleem Watson
Publisher:
Cengage Learning
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning