"Not enough input arguments" error when integrating a function
2 ビュー (過去 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!