"Not enough input arguments" error when integrating a function
조회 수: 3 (최근 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!