Why Does My MATLAB Plot Show a Line Instead of a Point?

  • Context: MATLAB 
  • Thread starter Thread starter theBEAST
  • Start date Start date
  • Tags Tags
    Matlab Plot Point
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
theBEAST
Messages
361
Reaction score
0
I have attached a picture of my problem to this thread. When I plot the column vector
x=[1;1]
I get a straight line instead of a point, does anyone know how to fix this?
 

Attachments

  • Capture.PNG
    Capture.PNG
    10.7 KB · Views: 640
Physics news on Phys.org
Code:
plot(x,y);
where (x,y) is a point.

To show points, also:
Code:
plot(x,y 'o');
 
jhae2.718 said:
Code:
plot(x,y);
where (x,y) is a point.

To show points, also:
Code:
plot(x,y 'o');

Thanks but for this assignment I have to plot the x column vector that I get from doing another calculation that I did not show. Maybe I can extract the numbers out of the column but we have not been taught that.
 
plot(x(1),x(2));

for multiple elements,
plot(x(1, :), x(2, :))