Why am I getting undefined variable error?

 Risposta accettata

Adam
Adam il 13 Mar 2017
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 Commento

aditi15
aditi15 il 13 Mar 2017
Modificato: aditi15 il 13 Mar 2017
Hey I am calling it in main as pwlcm(2); Okay its running successfully thanx

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Argument Definitions in Centro assistenza e File Exchange

Richiesto:

il 13 Mar 2017

Modificato:

il 13 Mar 2017

Community Treasure Hunt

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

Start Hunting!

Translated by