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

2 Ansichten (letzte 30 Tage)
x=0.2
y=3,5,7

Akzeptierte Antwort

KSSV
KSSV am 11 Mai 2018
x=0.2 ;
y=[3,5,7]
plot(x,y,'*r')
In such cases, you need to use a marker.
  1 Kommentar
Stephan
Stephan am 11 Mai 2018
Hi,
nice to know - i always thought length of x and y have to be equal.
Best regards
Stephan

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by