Why am I getting undefined variable error?

 채택된 답변

Adam
Adam 2017년 3월 13일

0 개 추천

How are you calling your function? If you are just clicking the big green 'Run' at the top then of course you will get this error. Your function takes 'x' as an input argument. If you don't supply it by calling the function from command line or another function then it won't exist.

댓글 수: 1

aditi15
aditi15 2017년 3월 13일
편집: aditi15 2017년 3월 13일
Hey I am calling it in main as pwlcm(2); Okay its running successfully thanx

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Argument Definitions에 대해 자세히 알아보기

질문:

2017년 3월 13일

편집:

2017년 3월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by