"Not enough input arguments" error when integrating a function
9 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I am trying to numerically integrate a function and keep receiving the error "Not enough input arguments."
My code:
integral(fun,0,1)
while fun.m reads:
function [ y ] = fun( x ) y = x*2 + 1; end
What am I missing here? Thanks in advance!
0 个评论
回答(2 个)
Fabian
2013-3-19
1 个评论
Kye Taylor
2013-3-19
Yeah... pass those variables as input to the function (best practice).
Also, please accept answers that you find helpful. (My first one.)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!