Show us code to prove it, but, from the symptom described you wrote something like:
which would display what you described (and have done precisely what you told MATLAB to do). With no x passed to it, plot doesn't know anything at all about the fact you defined x somewhere else; all it can do is use what it was given.
is the correct syntax.
HINT: Read the documentation before crying wolf! It'll be faster most of the time than waiting for somebody here to see and answer. :)