Unrecognized function or variable 'x'.
3 次查看(过去 30 天)
显示 更早的评论
function y=f(x) %error message Input argument x might be unused
m = linspace(0,Inf,100);
x = linspace(-2.*pi,2.*pi);
y= int(x.^2 .* exp(-(x/2)), 0, m) - 8;
0 个评论
回答(1 个)
the cyclist
2021-12-4
Because you have the code
x = linspace(-2.*pi,2.*pi);
the value of x that comes in via the input is never used. That is why you see a warning message.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!