Clear Filters
Clear Filters

How can i plot a graph with different y values for a particular x value?

1 view (last 30 days)
x=0.2
y=3,5,7

Accepted Answer

KSSV
KSSV on 11 May 2018
x=0.2 ;
y=[3,5,7]
plot(x,y,'*r')
In such cases, you need to use a marker.

More Answers (1)

Stephan
Stephan on 11 May 2018
Edited: Stephan on 11 May 2018
Hi,
x(1:3) = 0.2;
y = [3 5 7];
plot(x,y, '*', 'color', 'r')
gives you:
Best regards
Stephan

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!