Plotting y=x Function in Matlab: Tips for Beginners

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
djdato
Messages
5
Reaction score
0
I am new to Matlab and i need to plot a function. However, using y=x as an example it always comes up saying that x is not defined. How do i plot the function without specifying a specific value for x? Graphing y=x is not my real problem. I am used to using TI-83/4 graphics calculators and typing a function like y=x^2 and just graphing it. But i can't do it on MATLAB as it always needs me to define x.

Regards,
djdato
 
Last edited:
Physics news on Phys.org