how can i resolve it not enough input arguments?

조회 수: 2 (최근 30일)
Pooja Prajapati
Pooja Prajapati 2017년 1월 30일
댓글: Adam 2017년 1월 31일
function demo(testdir, n, code)
for k = 1:n %getting error in it

채택된 답변

Adam
Adam 2017년 1월 30일
편집: Adam 2017년 1월 31일
Pass the right number of arguments in when you call it. Don't just hit the big green 'Run' button, call it from command line or a script or another function and pass in the arguments.
If you are calling it without arguments how would you expect it to know what n is and didn't you consider that you haven't been able to tell it what n is and that you want to?!
  댓글 수: 2
Pooja Prajapati
Pooja Prajapati 2017년 1월 30일
actually i m using this code direct from sources available from internet,
so n fairly i m new here in matlab so i simply don't know how to run it exactly,
N so i didn't know what is n actually here?
That's the problem actually,
so expecting help please guide me here what is n here?
& what input arguments i have to give in command prompt?
thanks in adv.
Adam
Adam 2017년 1월 31일
I have no idea what the function is? But why are you running the function at all if you don't know what it does or what its inputs are supposed to be? I rarely download Matlab code from the internet for exactly this reason of not knowing what its inputs are supposed to be often.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by