Whenever I try to use my function f(x,y) I get an error message that says that I need to define f.
1 view (last 30 days)
Show older comments
f = @(x,y) x+y;
and the error message i get says
"The value assigned to the variable 'f' might be unused."
I do not know what to do or what is happening, I am working on a Eulers project and I need the function to run correctly.
0 Comments
Answers (1)
Kevin Holly
on 13 Oct 2021
I do not have the error when I run it.
f = @(x,y) x+y;
f(6,7)
Are you defining f as a variable afterwards as such?
f = @(x,y) x+y;
f = 6
0 Comments
See Also
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!