Whenever I try to use my function f(x,y) I get an error message that says that I need to define f.
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Kevin Holly
2021 年 10 月 13 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!