Why am I getting undefined variable error?

 Respuesta aceptada

Adam
Adam el 13 de Mzo. de 2017

0 votos

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 comentario

aditi15
aditi15 el 13 de Mzo. de 2017
Editada: aditi15 el 13 de Mzo. de 2017
Hey I am calling it in main as pwlcm(2); Okay its running successfully thanx

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Argument Definitions en Centro de ayuda y File Exchange.

Preguntada:

el 13 de Mzo. de 2017

Editada:

el 13 de Mzo. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by