Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Plot function 1

Status
Not open for further replies.

jack24

Electrical
Jun 11, 2007
1
Hello all,

I have a small but extremely frustrating problem. When I try to use the Plot function in Matlab, I get an error. This never happened before to me. For example, if I write the following code:

x=[-5:1:5]

y =x;

plot(x,y)

And then save and run it, I get an error that states:

??? Attempt to execute SCRIPT plot as a function

Error in ==> plot2 at 5
plot(x,y)

Can anyone tell me what this means?? Or how I can overcome this little problem? Thank you very much all.
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor