"Not enough input arguments" error when integrating a function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Fabian
am 19 Mär. 2013
1 Kommentar
Kye Taylor
am 19 Mär. 2013
Yeah... pass those variables as input to the function (best practice).
Also, please accept answers that you find helpful. (My first one.)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!