Error while trying to access a function

조회 수: 1 (최근 30일)
Smith
Smith 2011년 7월 4일
I have a function in matlab. When I try to run the file I get an error which says "Input Argument undefined". Please anybody let me know what can be done with this.
Thanks in advance Smith.

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 7월 4일
Hi,
this error comes if you call a function without the input argument. Say your function looks like
function y = myfun(x)
the function expects to be called like this, e.g.
y = myfun(42);
If you just call
y = myfun
you will get this error. Does this help?
Titus
  댓글 수: 1
Smith
Smith 2011년 7월 5일
Thanks to you Titus, it worked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by