Plotting graph using arrays
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
x=zeros(1,10);
x(2:4) =1;
y= linspace(0,10,10);
plot(y,x)

I want a straight vertical line but matlab is giving me a slant line.Any solution?
1 Kommentar
Antworten (1)
KSSV
am 25 Okt. 2017
x = [1 1 2 3 4 4 5 6 7 8 9 10] ;
y = [0 1 1 1 1 0 0 0 0 0 0 0] ;
plot(x,y)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!