No data points appear on the graph when I hit run
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
figure (1) %selects plotting window #1
plot(0, 98, 'c--', .02, 245, 'c--', .04, 490, 'c--', .05, 735, 'c--', .06, 931, 'c--', .08, 931, 'c--', .10, 980, 'c--');
I tried adding brackets like this ( [x,y,s,] ) and the graph itself dissapered
0 Kommentare
Antworten (1)
  DGM
      
      
 am 13 Sep. 2021
        
      Bearbeitet: DGM
      
      
 am 13 Sep. 2021
  
      When you plot points one at a time, they are rendered as single unconnected points.  Since there is no specified marker type, they don't show up.  
You could specify a marker type (i'm using blue so it shows up better against white on the web-view)
plot(0, 98, 'bx', .02, 245, 'bx', .04, 490, 'bx', .05, 735, 'bx', .06, 931, 'bx', .08, 931, 'bx', .10, 980, 'bx');
or you could plot the points as a series
clc
x = [0 0.02 0.04 0.05 0.06 0.08 0.10];
y = [98 245 490 735 931 931 980];
plot(x,y,'b--')
0 Kommentare
Siehe auch
Kategorien
				Mehr zu 2-D and 3-D Plots 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!



