Why am I getting undefined variable error?

 Akzeptierte Antwort

Adam
Adam am 13 Mär. 2017

0 Stimmen

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 Kommentar

aditi15
aditi15 am 13 Mär. 2017
Bearbeitet: aditi15 am 13 Mär. 2017
Hey I am calling it in main as pwlcm(2); Okay its running successfully thanx

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Argument Definitions finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 13 Mär. 2017

Bearbeitet:

am 13 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by