plot.ts aktualisiert
							parent
							
								
									031f151f56
								
							
						
					
					
						commit
						1cbda6c784
					
				
							
								
								
									
										2
									
								
								plot.ts
								
								
								
								
							
							
						
						
									
										2
									
								
								plot.ts
								
								
								
								
							|  | @ -9,7 +9,7 @@ export const plot = (data) => { | |||
| } | ||||
| 
 | ||||
| export const plotxy = (xmin, xmax, step, y) => { | ||||
|   const x = Array.from({length: (xmax - xmin)/step}, (_, i) => (i - xmin) * step) | ||||
|   const x = Array.from({length: (xmax - xmin)/step}, (_, i) => (i + xmin) * step) | ||||
|   const data = x.map(x => ({x, y: y(x)})) | ||||
|   return Plot.line(data, {x: "x", y: "y"}).plot({y: {grid: true}, document}) | ||||
| } | ||||
		Loading…
	
		Reference in New Issue